Compile Error

/in/foo.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
/in/foo.cc:3:8: error: 'string' was not declared in this scope
    3 | int hw(string &s2){
      |        ^~~~~~
/in/foo.cc:3:16: error: 's2' was not declared in this scope
    3 | int hw(string &s2){
      |                ^~
/in/foo.cc:11:15: error: 'string' was not declared in this scope
   11 | int check_new(string &s2,string a[],int xb2){
      |               ^~~~~~
/in/foo.cc:11:23: error: 's2' was not declared in this scope
   11 | int check_new(string &s2,string a[],int xb2){
      |                       ^~
/in/foo.cc:11:26: error: 'string' was not declared in this scope
   11 | int check_new(string &s2,string a[],int xb2){
      |                          ^~~~~~
/in/foo.cc:11:37: error: expected primary-expression before 'int'
   11 | int check_new(string &s2,string a[],int xb2){
      |                                     ^~~
/in/foo.cc:11:44: error: expression list treated as compound expression in initializer [-fpermissive]
   11 | int check_new(string &s2,string a[],int xb2){
      |                                            ^
/in/foo.cc:18:9: error: 'string' does not name a type
   18 |         string a[xb];
      |         ^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:21:5: error: 'string' was not declared in this scope
   21 |     string s;
      |     ^~~~~~
/in/foo.cc:22:5: error: 'cin' was not declared in this scope
   22 |     cin>>s;
      |     ^~~
/in/foo.cc:22:10: error: 's' was not declared in this scope
   22 |     cin>>s;
      |          ^
/in/foo.cc:27:15: error: expected ';' before 's2'
   27 |         string s2=s.substr(i,j);
      |               ^~~
      |               ;
/in/foo.cc:28:15: error: 's2' was not declared in this scope
   28 |         if(hw(s2)&&check_new(s2,a,xb2)){
      |               ^~
/in/foo.cc:28:17: error: 'hw' cannot be used as a function
   28 |         if(hw(s2)&&check_new(s2,a,xb2)){
      |                 ^
/in/foo.cc:28:33: error: 'a' was not declared in this scope
   28 |         if(hw(s2)&&check_new(s2,a,xb2)){
      |                                 ^
/in/foo.cc:28:29: error: 'check_new' cannot be used as a function
   28 |         if(hw(s2)&&check_new(s2,a,xb2)){
      |                    ~~~~~~~~~^~~~~~~~~~
/in/foo.cc:29:13: error: 'cout' was not declared in this scope
   29 |             cout<<s2<<endl;
      |             ^~~~
/in/foo.cc:29:23: error: 'endl' was not declared in this scope
   29 |             cout<<s2<<endl;
      |                       ^~~~
/in/foo.cc:34:18: error: expected '}' at end of input
   34 |         return 0;
      |                  ^
/in/foo.cc:19:11: note: to match this '{'
   19 | int main(){
      |           ^

信息

递交者
类型
递交
题目
P2422 1.7.34回文子串
语言
C++
递交时间
2026-02-25 09:27:42
评测时间
2026-02-25 09:27:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes