foo.cc: In function 'int main()':
foo.cc:14:19: warning: array subscript has type 'char' [-Wchar-subscripts]
14 | num[str[i]]++;
| ^
foo.cc:15:22: warning: array subscript has type 'char' [-Wchar-subscripts]
15 | if(num[str[i]]>max){
| ^
foo.cc:16:27: warning: array subscript has type 'char' [-Wchar-subscripts]
16 | max=num[str[i]];
| ^
foo.cc:21:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
21 | for(int i=0;i<str.size();i++){
| ~^~~~~~~~~~~
foo.cc:26:36: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
26 | if(i<len||str[i]==maxletter&&i==len){
foo.cc:22:32: warning: 'maxletter' may be used uninitialized in this function [-Wmaybe-uninitialized]
22 | while(str[i]!=maxletter&&i<len){
[Hydro](https://hydro.ac)提供评测服务