/ OPS /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:11:19: warning: comparison with string literal results in unspecified behavior [-Waddress]
   11 |    if (choice[0]=="Y");
      |                   ^~~
/in/foo.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:11:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   11 |    if (choice[0]=="Y");
      |    ^~
/in/foo.cc:12:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   12 |       yescount++;
      |       ^~~~~~~~
/in/foo.cc:13:4: error: 'else' without a previous 'if'
   13 |    else if (choice[0]=="N");
      |    ^~~~
/in/foo.cc:13:24: warning: comparison with string literal results in unspecified behavior [-Waddress]
   13 |    else if (choice[0]=="N");
      |                        ^~~
/in/foo.cc:13:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:13:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   13 |    else if (choice[0]=="N");
      |         ^~
/in/foo.cc:14:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   14 |       nocunt++:
      |       ^~~~~~
/in/foo.cc:14:7: error: 'nocunt' was not declared in this scope; did you mean 'nocount'?
   14 |       nocunt++:
      |       ^~~~~~
      |       nocount
/in/foo.cc:16:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   16 |   if (yescount> nocount);
      |   ^~
/in/foo.cc:17:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   17 |     cout<<"Yes"<<endl;
      |     ^~~~
/in/foo.cc:18:3: error: 'else' without a previous 'if'
   18 |   else
      |   ^~~~

信息

递交者
类型
自测
语言
C++
递交时间
2024-11-21 08:22:22
评测时间
2024-11-21 08:22:22
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes