foo.cc: In function ‘int main()’:
foo.cc:7:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
7 | for(int i=0;i<strlen(s);i++) a[s[i]]++;
| ~^~~~~~~~~~
foo.cc:7:43: warning: array subscript has type ‘char’ [-Wchar-subscripts]
7 | for(int i=0;i<strlen(s);i++) a[s[i]]++;
| ~~~^
foo.cc:8:41: warning: array subscript has type ‘char’ [-Wchar-subscripts]
8 | for(char i='a';i<='z';i++) if(a[i]!=0) cout<<s[i];
| ^
foo.cc:8:56: warning: array subscript has type ‘char’ [-Wchar-subscripts]
8 | for(char i='a';i<='z';i++) if(a[i]!=0) cout<<s[i];
| ^
foo.cc:10:41: warning: array subscript has type ‘char’ [-Wchar-subscripts]
10 | for(char i='a';i<='z';i++) if(a[i]!=0) cout<<a[i];
| ^
foo.cc:10:56: warning: array subscript has type ‘char’ [-Wchar-subscripts]
10 | for(char i='a';i<='z';i++) if(a[i]!=0) cout<<a[i];
| ^