foo.cc: In function 'int search(std::string&, std::string&, int)':
foo.cc:11:14: error: expected unqualified-id before 'int'
11 | for(int j=i,int starti=0;j<=s1.length();j++)
| ^~~
foo.cc:11:14: error: expected ';' before 'int'
11 | for(int j=i,int starti=0;j<=s1.length();j++)
| ^~~
| ;
foo.cc:11:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
11 | for(int j=i,int starti=0;j<=s1.length();j++)
| ~^~~~~~~~~~~~~
foo.cc:11:28: warning: value computed is not used [-Wunused-value]
foo.cc:11:41: error: expected ')' before ';' token
11 | for(int j=i,int starti=0;j<=s1.length();j++)
| ~ ^
| )
foo.cc:11:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
11 | for(int j=i,int starti=0;j<=s1.length();j++)
| ^~~
foo.cc:11:42: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
11 | for(int j=i,int starti=0;j<=s1.length();j++)
| ^
foo.cc:11:18: warning: unused variable 'starti' [-Wunused-variable]
11 | for(int j=i,int starti=0;j<=s1.length();j++)
| ^~~~~~
foo.cc:11:42: error: 'j' was not declared in this scope
11 | for(int j=i,int starti=0;j<=s1.length();j++)
| ^
foo.cc: In function 'int main()':
foo.cc:27:14: error: expected unqualified-id before 'int'
27 | for(int j=i,int k=0;j<=s3.length()&&j!=-1;j++,k++)
| ^~~
foo.cc:27:14: error: expected ';' before 'int'
27 | for(int j=i,int k=0;j<=s3.length()&&j!=-1;j++,k++)
| ^~~
| ;
foo.cc:27:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | for(int j=i,int k=0;j<=s3.length()&&j!=-1;j++,k++)
| ~^~~~~~~~~~~~~
foo.cc:27:43: error: expected ')' before ';' token
27 | for(int j=i,int k=0;j<=s3.length()&&j!=-1;j++,k++)
| ~ ^
| )
foo.cc:27:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
27 | for(int j=i,int k=0;j<=s3.length()&&j!=-1;j++,k++)
| ^~~
foo.cc:27:44: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
27 | for(int j=i,int k=0;j<=s3.length()&&j!=-1;j++,k++)
| ^
foo.cc:27:18: warning: unused variable 'k' [-Wunused-variable]
27 | for(int j=i,int k=0;j<=s3.length()&&j!=-1;j++,k++)
| ^
foo.cc:27:44: error: 'j' was not declared in this scope
27 | for(int j=i,int k=0;j<=s3.length()&&j!=-1;j++,k++)
| ^
foo.cc:27:48: error: 'k' was not declared in this scope
27 | for(int j=i,int k=0;j<=s3.length()&&j!=-1;j++,k++)
| ^
[Hydro](https://hydro.ac)提供评测服务