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_38761977_28569.cpp:35:8: error: redefinition of 'struct tm'
   35 | struct tm
      |        ^~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cwchar:44,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/postypes.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iosfwd:42,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
                 from 0_0_38761977_28569.cpp:17:
gcc-13.1.0/x86_64-w64-mingw32/include/wchar.h:1383:10: note: previous definition of 'struct tm'
 1383 |   struct tm {
      |          ^~
0_0_38761977_28569.cpp: In function 'int cmp(tm, tm)':
0_0_38761977_28569.cpp:42:14: error: 'struct tm' has no member named 'h'
   42 |         if(a.h==b.h)
      |              ^
0_0_38761977_28569.cpp:42:19: error: 'struct tm' has no member named 'h'
   42 |         if(a.h==b.h)
      |                   ^
0_0_38761977_28569.cpp:44:22: error: 'struct tm' has no member named 'm'; did you mean 'tm'?
   44 |                 if(a.m==b.m) return strcmp(a.name,b.name)<0;
      |                      ^
      |                      tm
0_0_38761977_28569.cpp:44:27: error: 'struct tm' has no member named 'm'; did you mean 'tm'?
   44 |                 if(a.m==b.m) return strcmp(a.name,b.name)<0;
      |                           ^
      |                           tm
0_0_38761977_28569.cpp:44:46: error: 'struct tm' has no member named 'name'
   44 |                 if(a.m==b.m) return strcmp(a.name,b.name)<0;
      |                                              ^~~~
0_0_38761977_28569.cpp:44:53: error: 'struct tm' has no member named 'name'
   44 |                 if(a.m==b.m) return strcmp(a.name,b.name)<0;
      |                                                     ^~~~
0_0_38761977_28569.cpp:45:26: error: 'struct tm' has no member named 'm'; did you mean 'tm'?
   45 |                 return a.m<b.m;
      |                          ^
      |                          tm
0_0_38761977_28569.cpp:45:30: error: 'struct tm' has no member named 'm'; did you mean 'tm'?
   45 |                 return a.m<b.m;
      |                              ^
      |                              tm
0_0_38761977_28569.cpp:47:18: error: 'struct tm' has no member named 'h'
   47 |         return a.h<b.h;
      |                  ^
0_0_38761977_28569.cpp:47:22: error: 'struct tm' has no member named 'h'
   47 |         return a.h<b.h;
      |                      ^
0_0_38761977_28569.cpp: In function 'int main()':
0_0_38761977_28569.cpp:58:47: error: request for member 'name' in 'a[i]', which is of non-class type 'int'
   58 |                         scanf("%s %d:%d",a[i].name,&a[i].h,&a[i].m);
      |                                               ^~~~
0_0_38761977_28569.cpp:58:58: error: request for member 'h' in 'a[i]', which is of non-class type 'int'
   58 |                         scanf("%s %d:%d",a[i].name,&a[i].h,&a[i].m);
      |                                                          ^
0_0_38761977_28569.cpp:58:66: error: request for member 'm' in 'a[i]', which is of non-class type 'int'
   58 |                         scanf("%s %d:%d",a[i].name,&a[i].h,&a[i].m);
      |                                                                  ^
0_0_38761977_28569.cpp:62:39: error: request for member 'name' in 'a[1]', which is of non-class type 'int'
   62 |                 printf("%s %d\n",a[1].name,1);
      |                                       ^~~~
0_0_38761977_28569.cpp:66:33: error: request for member 'h' in 'a[i]', which is of non-class type 'int'
   66 |                         if(a[i].h==a[i-1].h&&a[i].m==a[i-1].m) printf("%s %d\n",a[i].name,temp);
      |                                 ^
0_0_38761977_28569.cpp:66:43: error: request for member 'h' in 'a[(i - 1)]', which is of non-class type 'int'
   66 |                         if(a[i].h==a[i-1].h&&a[i].m==a[i-1].m) printf("%s %d\n",a[i].name,temp);
      |                                           ^
0_0_38761977_28569.cpp:66:51: error: request for member 'm' in 'a[i]', which is of non-class type 'int'
   66 |                         if(a[i].h==a[i-1].h&&a[i].m==a[i-1].m) printf("%s %d\n",a[i].name,temp);
      |                                                   ^
0_0_38761977_28569.cpp:66:61: error: request for member 'm' in 'a[(i - 1)]', which is of non-class type 'int'
   66 |                         if(a[i].h==a[i-1].h&&a[i].m==a[i-1].m) printf("%s %d\n",a[i].name,temp);
      |                                                             ^
0_0_38761977_28569.cpp:66:86: error: request for member 'name' in 'a[i]', which is of non-class type 'int'
   66 |                         if(a[i].h==a[i-1].h&&a[i].m==a[i-1].m) printf("%s %d\n",a[i].name,temp);
      |                                                                                      ^~~~
0_0_38761977_28569.cpp:69:55: error: request for member 'name' in 'a[i]', which is of non-class type 'int'
   69 |                                 printf("%s %d\n",a[i].name,i);
      |                                                       ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:71,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:51,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/locale_classes.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:44:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = int*; _Iterator2 = int*; _Compare = int (*)(tm, tm)]':
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:1819:14:   required from 'constexpr void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int (*)(tm, tm)>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:1859:25:   required from 'constexpr void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int (*)(tm, tm)>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:1950:31:   required from 'constexpr void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int (*)(tm, tm)>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:4894:18:   required from 'constexpr void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int*; _Compare = int (*)(tm, tm)]'
0_0_38761977_28569.cpp:60:7:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/predefined_ops.h:158:30: error: could not convert '* __it1' from 'int' to 'tm'
  158 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~~~
      |                              |
      |                              int
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = int; _Iterator = int*; _Compare = int (*)(tm, tm)]':
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:1799:20:   required from 'constexpr void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Val_comp_iter<int (*)(tm, tm)>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:1827:36:   required from 'constexpr void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int (*)(tm, tm)>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:1859:25:   required from 'constexpr void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int (*)(tm, tm)>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:1950:31:   required from 'constexpr void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int (*)(tm, tm)>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:4894:18:   required from 'constexpr void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int*; _Compare = int (*)(tm, tm)]'
0_0_38761977_28569.cpp:60:7:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/predefined_ops.h:240:30: error: could not convert '__val' from 'int' to 'tm'
  240 |         { return bool(_M_comp(__val, *__it)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~
      |                              |
      |                              int
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/inclu


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-11-16 11:08:14, Gzip enabled