F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_20035517_9779.cpp:14:8: error: 'Time time [3]' redeclared as different kind of symbol
 }time[3];
        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/ctime:42:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_facets_nonio.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/locale:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iomanip:43,
                 from 0_0_20035517_9779.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/time.h:233:29: note: previous declaration 'time_t time(time_t*)'
 __CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); }
                             ^
0_0_20035517_9779.cpp: In function 'int main()':
0_0_20035517_9779.cpp:28:19: error: request for member 'h' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
    cin >> time[i].h >> c >> time[i].m;
                   ^
0_0_20035517_9779.cpp:28:37: error: request for member 'm' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
    cin >> time[i].h >> c >> time[i].m;
                                     ^
0_0_20035517_9779.cpp:29:12: error: request for member 'a' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
    time[i].a = 60 * time[i].h + time[i].m;
            ^
0_0_20035517_9779.cpp:29:29: error: request for member 'h' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
    time[i].a = 60 * time[i].h + time[i].m;
                             ^
0_0_20035517_9779.cpp:29:41: error: request for member 'm' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
    time[i].a = 60 * time[i].h + time[i].m;
                                         ^
0_0_20035517_9779.cpp:35:16: error: request for member 'a' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
    if (time[i].a <= time[(i + 1) % 3].a)
                ^
0_0_20035517_9779.cpp:35:39: error: request for member 'a' in '*(time + ((sizetype)((i + 1) % 3)))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
    if (time[i].a <= time[(i + 1) % 3].a)
                                       ^
0_0_20035517_9779.cpp:36:34: error: request for member 'a' in '*(time + ((sizetype)((i + 1) % 3)))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     minus[i] = time[(i + 1) % 3].a - time[i].a;
                                  ^
0_0_20035517_9779.cpp:36:46: error: request for member 'a' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     minus[i] = time[(i + 1) % 3].a - time[i].a;
                                              ^
0_0_20035517_9779.cpp:38:35: error: request for member 'a' in '*(time + ((sizetype)((i + 1) % 3)))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     minus[i] = (time[(i + 1) % 3].a + 12 * 60) - time[i].a;
                                   ^
0_0_20035517_9779.cpp:38:58: error: request for member 'a' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     minus[i] = (time[(i + 1) % 3].a + 12 * 60) - time[i].a;
                                                          ^
0_0_20035517_9779.cpp:53:47: error: request for member 'h' in '*(time + ((sizetype)j))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     cout << "The correct time is " << time[j].h << ":" << setw(2) << right << setfill('0') << time[j].m << endl;
                                               ^
0_0_20035517_9779.cpp:53:103: error: request for member 'm' in '*(time + ((sizetype)j))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     cout << "The correct time is " << time[j].h << ":" << setw(2) << right << setfill('0') << time[j].m << endl;
                                                                                                       ^
0_0_20035517_9779.cpp:55:47: error: request for member 'h' in '*(time + ((sizetype)j))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     cout << "The correct time is " << time[j].h << ":" << setw(2) << right << setfill('0') << time[j].m << endl;
                                               ^
0_0_20035517_9779.cpp:55:103: error: request for member 'm' in '*(time + ((sizetype)j))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     cout << "The correct time is " << time[j].h << ":" << setw(2) << right << setfill('0') << time[j].m << endl;
                                                                                                       ^
0_0_20035517_9779.cpp:57:47: error: request for member 'h' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     cout << "The correct time is " << time[i].h << ":" << setw(2) << right << setfill('0') << time[i].m << endl;
                                               ^
0_0_20035517_9779.cpp:57:103: error: request for member 'm' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*) {aka long long int(long long int*)}'
     cout << "The correct time is " << time[i].h << ":" << setw(2) << right << setfill('0') << time[i].m << endl;
                                                                                                       ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from 0_0_20035517_9779.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int (*)(long long int*); _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4685:72:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = long long int (*)(long long int*)]'
0_0_20035517_9779.cpp:31:22:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1968:22: error: ISO C++ forbids using pointer to a function in subtraction [-fpermissive]
     std::__lg(__last - __first) * 2,
                      ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-10-05 23:26:46, Gzip enabled