foo.cc: In function 'int main()':
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 i = 1; i < s.size() - 1; ++i) {
| ~~^~~~~~~~~~~~~~
foo.cc:32:23: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare]
32 | for (int i = 1; i < szt; ++i) {
| ~~^~~~~
foo.cc:34:25: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'long long unsigned int' [-Wformat=]
34 | else printf("0x%X", t[i]);
| ~^ ~~~~
| | |
| | long long unsigned int
| unsigned int
| %llX
foo.cc:35:20: error: expected ';' before '}' token
35 | cout << ','
| ^
| ;
36 | }
| ~
foo.cc:38:21: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'long long unsigned int' [-Wformat=]
38 | else printf("0x%X", t[szt]);
| ~^ ~~~~~~
| | |
| | long long unsigned int
| unsigned int
| %llX
foo.cc:39:16: error: expected ';' before '}' token
39 | cout << "}"
| ^
| ;
40 | }
| ~
[Hydro](https://hydro.ac)提供评测服务