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_32368287_27957.cpp:9: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_32368287_27957.cpp:5:
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_32368287_27957.cpp: In function 'int find(int)':
0_0_32368287_27957.cpp:14:28: error: invalid conversion from 'double (*)(const char*)' to 'int' [-fpermissive]
    if(nan[i]==0||find(nan[i])){
                            ^
0_0_32368287_27957.cpp:10:5: note: initializing argument 1 of 'int find(int)'
 int find(int x){
     ^
0_0_32368287_27957.cpp:15:12: error: assignment of read-only location '*(nan + ((sizetype)i))'
      nan[i]=x;
            ^
0_0_32368287_27957.cpp:15:12: error: cannot convert 'int' to 'double(const char*)' in assignment
0_0_32368287_27957.cpp: In function 'int main()':
0_0_32368287_27957.cpp:32:27: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive]
    memset(nan,0,sizeof(nan));
                           ^
0_0_32368287_27957.cpp:32: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_32368287_27957.cpp:2:
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);
                  ^


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-07-03 09:56:21, Gzip enabled