foo.cc: In function 'int main()':
foo.cc:8:11: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
8 | gets(b);
| ^
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:46,
from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.cc:8:11: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
8 | gets(b);
| ^
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:46,
from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.cc:10:10: warning: array subscript has type 'char' [-Wchar-subscripts]
10 | a[b[i]]=i+'a';
| ~~~^
foo.cc:15:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
15 | for(j=0;j<c[i].length();j++)
| ~^~~~~~~~~~~~~~
foo.cc:16:26: warning: array subscript has type 'char' [-Wchar-subscripts]
16 | c[i][j]=a[c[i][j]];
| ^
foo.cc:8:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
8 | gets(b);
| ~~~~^~~
foo.cc:11:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
11 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
foo.cc:18:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
18 | scanf("%d",&sn);
| ~~~~~^~~~~~~~~~
/usr/bin/ld: /tmp/ccVFwUuS.o: in function `main':
foo.cc:(.text.startup+0xb0): warning: the `gets' function is dangerous and should not be used.
[Hydro](https://hydro.ac)提供评测服务