foo.cc: In function 'int main()':
foo.cc:9:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
9 | for(int i=0;i<st.size();i++)
| ~^~~~~~~~~~
foo.cc:12:22: error: invalid types 'int[int]' for array subscript
12 | if(st[i]>='0'&&st[i]<='9'||st[i]>='A'&&st[i]<='F')
| ^
foo.cc:12:34: error: invalid types 'int[int]' for array subscript
12 | if(st[i]>='0'&&st[i]<='9'||st[i]>='A'&&st[i]<='F')
| ^
foo.cc:12:46: error: invalid types 'int[int]' for array subscript
12 | if(st[i]>='0'&&st[i]<='9'||st[i]>='A'&&st[i]<='F')
| ^
foo.cc:12:58: error: invalid types 'int[int]' for array subscript
12 | if(st[i]>='0'&&st[i]<='9'||st[i]>='A'&&st[i]<='F')
| ^
foo.cc:14:32: error: invalid types 'int[int]' for array subscript
14 | for(;st[end]>='A'&&st[end]<='F';)
| ^
foo.cc:14:46: error: invalid types 'int[int]' for array subscript
14 | for(;st[end]>='A'&&st[end]<='F';)
| ^
foo.cc:14:25: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
14 | for(;st[end]>='A'&&st[end]<='F';)
| ^~~
foo.cc:15:39: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
15 | end++;end--;
| ^~~
foo.cc:17:38: error: invalid types 'int[int]' for array subscript
17 | if(st[j]>='0'&&st[j]<='9')
| ^
foo.cc:17:50: error: invalid types 'int[int]' for array subscript
17 | if(st[j]>='0'&&st[j]<='9')
| ^
foo.cc:18:46: error: invalid types 'int[int]' for array subscript
18 | s+=st[j]-'0'*pow(16,++t);
| ^
foo.cc:19:43: error: invalid types 'int[int]' for array subscript
19 | else if(st[j]>='A'&&st[j]<='F')
| ^
foo.cc:19:55: error: invalid types 'int[int]' for array subscript
19 | else if(st[j]>='A'&&st[j]<='F')
| ^
foo.cc:20:46: error: invalid types 'int[int]' for array subscript
20 | s+=st[j]-'A'+10*pow(16,++t);
| ^
foo.cc:23:39: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
23 | else if(s>='A'&&s<='Z'||s>='a'&&s<='z')
| ~~~~~~^~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务