friends.cpp: In function 'int main()':
friends.cpp:9:14: warning: format '%s' expects argument of type 'char*', but argument 3 has type 'std::string' {aka 'std::__cxx11::basic_string<char>'} [-Wformat=]
9 | scanf("%d%s",&n,s);
| ~^ ~
| | |
| char* std::string {aka std::__cxx11::basic_string<char>}
friends.cpp:61:16: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::string' {aka 'std::__cxx11::basic_string<char>'} [-Wformat=]
61 | else printf("%d\n",anss);
| ~^ ~
| | |
| int std::string {aka std::__cxx11::basic_string<char>}
friends.cpp:9:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
9 | scanf("%d%s",&n,s);
| ~~~~~^~~~~~~~~~~~~