Compile Error

foo.cc: In function 'const char* p(char*, int)':
foo.cc:10:21: error: 'reak' was not declared in this scope
   10 |   if(b[i]!=b[n-i-1])reak if
      |                     ^~~~
foo.cc: At global scope:
foo.cc:18:1: error: '::main' must return 'int'
   18 | void main()
      | ^~~~
foo.cc: In function 'int main()':
foo.cc:22:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   22 |  gets(a);
      |        ^
In file included from /usr/include/stdio.h:867,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc:22:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   22 |  gets(a);
      |        ^
In file included from /usr/include/stdio.h:867,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc: At global scope:
foo.cc:26:1: error: expected unqualified-id before 'return'
   26 | return 0;
      | ^~~~~~
foo.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
foo.cc: In function 'int main()':
foo.cc:22:6: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
   22 |  gets(a);
      |  ~~~~^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1104 回文串
语言
C++
递交时间
2022-07-19 19:13:26
评测时间
2022-07-19 19:13:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes