0_0_32368262_25781.cpp:8:22: error: 'int nan [600]' redeclared as different kind of symbol
int used[600],nan[600];
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
from 0_0_32368262_25781.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:931:25: note: previous declaration 'double nan(const char*)'
extern double __cdecl nan(const char *tagp);
^
0_0_32368262_25781.cpp: In function 'int find(int)':
0_0_32368262_25781.cpp:13:28: error: invalid conversion from 'double (*)(const char*)' to 'int' [-fpermissive]
if(nan[i]==0||find(nan[i])){
^
0_0_32368262_25781.cpp:9:5: note: initializing argument 1 of 'int find(int)'
int find(int x){
^
0_0_32368262_25781.cpp:14:12: error: assignment of read-only location '*(nan + ((sizetype)i))'
nan[i]=x;
^
0_0_32368262_25781.cpp:14:12: error: cannot convert 'int' to 'double(const char*)' in assignment
0_0_32368262_25781.cpp: In function 'int main()':
0_0_32368262_25781.cpp:31:27: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive]
memset(nan,0,sizeof(nan));
^
0_0_32368262_25781.cpp:31:28: error: invalid conversion from 'double (*)(const char*)' to 'void*' [-fpermissive]
memset(nan,0,sizeof(nan));
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstring:42:0,
from 0_0_32368262_25781.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/string.h:43:18: note: initializing argument 1 of 'void* memset(void*, int, size_t)'
void * __cdecl memset(void *_Dst,int _Val,size_t _Size);
^
|