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_29681937_11247.cpp: In function 'bool check(char)':
0_0_29681937_11247.cpp:13:14: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
  if( strlen(s) == 2 && s[0] == 'n' && s[1] == 'o' ) return false;
              ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstring:42:0,
                 from 0_0_29681937_11247.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/string.h:54:18: note: initializing argument 1 of 'size_t strlen(const char*)'
   size_t __cdecl strlen(const char *_Str);
                  ^
0_0_29681937_11247.cpp:13:27: error: invalid types 'char[int]' for array subscript
  if( strlen(s) == 2 && s[0] == 'n' && s[1] == 'o' ) return false;
                           ^
0_0_29681937_11247.cpp:13:42: error: invalid types 'char[int]' for array subscript
  if( strlen(s) == 2 && s[0] == 'n' && s[1] == 'o' ) return false;
                                          ^
0_0_29681937_11247.cpp:14:14: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
  if( strlen(s) == 4 && s[0] == 'g' && s[1] == 'o' && s[2] == 'o' && s[3] == 'd' ) return false;
              ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstring:42:0,
                 from 0_0_29681937_11247.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/string.h:54:18: note: initializing argument 1 of 'size_t strlen(const char*)'
   size_t __cdecl strlen(const char *_Str);
                  ^
0_0_29681937_11247.cpp:14:27: error: invalid types 'char[int]' for array subscript
  if( strlen(s) == 4 && s[0] == 'g' && s[1] == 'o' && s[2] == 'o' && s[3] == 'd' ) return false;
                           ^
0_0_29681937_11247.cpp:14:42: error: invalid types 'char[int]' for array subscript
  if( strlen(s) == 4 && s[0] == 'g' && s[1] == 'o' && s[2] == 'o' && s[3] == 'd' ) return false;
                                          ^
0_0_29681937_11247.cpp:14:57: error: invalid types 'char[int]' for array subscript
  if( strlen(s) == 4 && s[0] == 'g' && s[1] == 'o' && s[2] == 'o' && s[3] == 'd' ) return false;
                                                         ^
0_0_29681937_11247.cpp:14:72: error: invalid types 'char[int]' for array subscript
  if( strlen(s) == 4 && s[0] == 'g' && s[1] == 'o' && s[2] == 'o' && s[3] == 'd' ) return false;
                                                                        ^
0_0_29681937_11247.cpp: In function 'int main()':
0_0_29681937_11247.cpp:28:44: error: invalid conversion from 'char*' to 'char' [-fpermissive]
    while( scanf("%s",s2) != EOF && check(s2) ) continue;
                                            ^
0_0_29681937_11247.cpp:12:6: note: initializing argument 1 of 'bool check(char)'
 bool check( char s ) {
      ^


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-11-23 08:38:12, Gzip enabled