foo.cc: In function 'int myAtoi(std::string)':
foo.cc:24:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
24 | while(i<s.size())
| ~^~~~~~~~~
foo.cc:6:17: warning: unused variable 'len' [-Wunused-variable]
6 | int i=0,flag=1,len=1;
| ^~~
foo.cc: In function 'int main()':
foo.cc:54:6: warning: unused variable 'n' [-Wunused-variable]
54 | int n=s.length();
| ^
foo.cc: In function 'int myAtoi(std::string)':
foo.cc:49:1: warning: control reaches end of non-void function [-Wreturn-type]
49 | }
| ^
[Hydro](https://hydro.ac)提供评测服务