foo.cc: In function 'int main()':
foo.cc:9:11: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
9 | for(i=0;i<s.size();i++)
| ~^~~~~~~~~
foo.cc:11:11: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
11 | for(i=1;i<s.size();i++)
| ~^~~~~~~~~
foo.cc:15:14: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
15 | for(j=i+1;j<=s.size();j++)
| ~^~~~~~~~~~
foo.cc:19:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll' {aka 'long long int'} [-Wformat=]
19 | printf("%d+%d=%d\n",t1,t2,t1+t2);
| ~^ ~~
| | |
| int ll {aka long long int}
| %lld
foo.cc:19:15: warning: format '%d' expects argument of type 'int', but argument 3 has type 'll' {aka 'long long int'} [-Wformat=]
19 | printf("%d+%d=%d\n",t1,t2,t1+t2);
| ~^ ~~
| | |
| int ll {aka long long int}
| %lld
foo.cc:19:18: warning: format '%d' expects argument of type 'int', but argument 4 has type 'll' {aka 'long long int'} [-Wformat=]
19 | printf("%d+%d=%d\n",t1,t2,t1+t2);
| ~^ ~~~~~
| | |
| int ll {aka long long int}
| %lld
foo.cc:23:21: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll' {aka 'long long int'} [-Wformat=]
23 | printf("summax is:%d\n",k);
| ~^ ~
| | |
| int ll {aka long long int}
| %lld
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务