0_0_39554100_29033.cpp:9:10: error: 'program time [110]' redeclared as different kind of entity
9 | }time[110];
| ^
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_39554100_29033.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_39554100_29033.cpp: In function 'int main()':
0_0_39554100_29033.cpp:18:38: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive]
18 | memset(time,0,sizeof(time));
| ~^~~~~
0_0_39554100_29033.cpp:18:24: error: invalid conversion from 'time_t (*)(time_t*)' {aka 'long long int (*)(long long int*)'} to 'void*' [-fpermissive]
18 | memset(time,0,sizeof(time));
| ^~~~
| |
| time_t (*)(time_t*) {aka long long int (*)(long long int*)}
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cstring:42,
from 0_0_39554100_29033.cpp:2:
gcc-13.1.0/x86_64-w64-mingw32/include/string.h:53:31: note: initializing argument 1 of 'void* memset(void*, int, size_t)'
53 | void * __cdecl memset(void *_Dst,int _Val,size_t _Size);
| ~~~~~~^~~~
0_0_39554100_29033.cpp:21:47: error: request for member 's' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
21 | scanf("%d%d",&time[i].s,&time[i].e);
| ^
0_0_39554100_29033.cpp:21:58: error: request for member 'e' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
21 | scanf("%d%d",&time[i].s,&time[i].e);
| ^
0_0_39554100_29033.cpp:24:34: error: request for member 'e' in '* time', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
24 | int temp=time[0].e,count=1;
| ^
0_0_39554100_29033.cpp:26:36: error: request for member 's' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
26 | if(time[i].s>=temp){
| ^
0_0_39554100_29033.cpp:27:38: error: no post-increment operator for type
27 | count++;
| ^~
0_0_39554100_29033.cpp:28:46: error: request for member 'e' in '*(time + ((sizetype)i))', which is of non-class type 'time_t(time_t*)' {aka 'long long int(long long int*)'}
28 | temp=time[i].e;
| ^
0_0_39554100_29033.cpp:31:23: error: overloaded function with no contextual type information
31 | printf("%d\n",count);
| ~~~~~~^~~~~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:61,
from 0_0_39554100_29033.cpp:3:
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 (*)(program, program)>]':
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 (*)(program, program)]'
0_0_39554100_29033.cpp:23: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,
| ~~~~~~~^~~~~~~~~
|