0_0_39677413_3215.cpp:8:11: error: 'tmp time [1001]' redeclared as different kind of entity
8 | }time[1001];
| ^
In file included from gcc-13.1.0/x86_64-w64-mingw32/include/pthread.h:69,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:35,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/x86_64-w64-mingw32/bits/gthr.h:148,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ext/atomicity.h:35,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:39,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:44,
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_39677413_3215.cpp:1:
gcc-13.1.0/x86_64-w64-mingw32/include/time.h:256:34: note: previous declaration 'time_t time(time_t*)'
256 | static __inline time_t __CRTDECL time(time_t *_Time) { return _time64(_Time); }
| ^~~~
0_0_39677413_3215.cpp: In function 'int main()':
0_0_39677413_3215.cpp:17:58: error: request for member 'dps' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
17 | for(int i = 0;i < n;i ++) cin >> time[i].dps >> time[i].hp;
| ^~~
0_0_39677413_3215.cpp:17:73: error: request for member 'hp' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
17 | for(int i = 0;i < n;i ++) cin >> time[i].dps >> time[i].hp;
| ^~
0_0_39677413_3215.cpp:22:39: error: request for member 'hp' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
22 | while(time[i].hp != 0)
| ^~
0_0_39677413_3215.cpp:24:41: error: request for member 'hp' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
24 | time[i].hp--;
| ^~
0_0_39677413_3215.cpp:25:78: error: request for member 'dps' in '*(time + ((sizetype)j))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
25 | for(int j = 0;j < n;j++) sum = sum + time[j].dps;
| ^~~
0_0_39677413_3215.cpp:27:36: error: request for member 'hp' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
27 | if(time[i].hp == 0) time[i].dps = 0;
| ^~
0_0_39677413_3215.cpp:27:53: error: request for member 'dps' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
27 | if(time[i].hp == 0) time[i].dps = 0;
| ^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:61,
from 0_0_39677413_3215.cpp:2:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h: In instantiation of 'constexpr void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long long int (*)(long long int*); _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int (*)(tmp, tmp)>]':
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 = long long int (*)(long long int*); _Compare = int (*)(tmp, tmp)]'
0_0_39677413_3215.cpp:18:7: required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:1948:50: error: ISO C++ forbids using pointer to a function in subtraction [-fpermissive]
1948 | std::__lg(__last - __first) * 2,
| ~~~~~~~^~~~~~~~~
|