0_0_39103181_7777.cpp:7:21: error: 'int time [100010]' redeclared as different kind of entity
7 | int time[100000 + 10]; //存次数的数组也要开到与n一样大
| ^
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_39103181_7777.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_39103181_7777.cpp: In function 'void chu(int)':
0_0_39103181_7777.cpp:12:17: error: assignment of read-only location '*(time + 1)'
12 | time[1] = 1;
| ~~~~~~~~^~~
0_0_39103181_7777.cpp:21:33: error: assignment of read-only location '*(time + ((sizetype)a))'
21 | time[a] = 1;
| ~~~~~~~~^~~
0_0_39103181_7777.cpp: In function 'int main()':
0_0_39103181_7777.cpp:41:40: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive]
41 | memset(time, 0, sizeof(time));
| ~^~~~~
0_0_39103181_7777.cpp:41:24: error: invalid conversion from 'time_t (*)(time_t*)' {aka 'long long int (*)(long long int*)'} to 'void*' [-fpermissive]
41 | 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_39103181_7777.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);
| ~~~~~~^~~~
|