foo.cc: In function ‘int main()’:
foo.cc:9:30: 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=1;i<=s.size();i++)
| ~^~~~~~~~~~
foo.cc:10:40: error: ‘n’ was not declared in this scope
10 | for(int j=1;j<=n;j++)
| ^
foo.cc:11:38: error: ‘a’ was not declared in this scope
11 | swap(a[j],a[i]);
| ^
foo.cc:12:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
12 | for(int i=1;i<=s.size();i++)
| ~^~~~~~~~~~
foo.cc:13:40: error: ‘n’ was not declared in this scope
13 | for(int j=1;j<=n;j++)
| ^
foo.cc:14:36: error: ‘a’ was not declared in this scope
14 | if(a[i]==0)
| ^
foo.cc:19:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
19 | for(int i=1;i<=s.size();i++)
| ~^~~~~~~~~~
foo.cc:20:40: error: ‘n’ was not declared in this scope
20 | for(int j=1;j<=n;j++)
| ^
foo.cc:21:38: error: ‘a’ was not declared in this scope
21 | swap(a[j],a[i]);
| ^
foo.cc:22:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
22 | for(int i=1;i<=s.size();i++)
| ~^~~~~~~~~~
foo.cc:23:40: error: ‘n’ was not declared in this scope
23 | for(int j=1;j<=n;j++)
| ^
foo.cc:24:36: error: ‘a’ was not declared in this scope
24 | if(a[i]==0)
| ^