foo.cc: In function ‘int main()’:
foo.cc:21:25: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘std::string*’ {aka ‘std::__cxx11::basic_string<char>*’} [-Wformat=]
21 | scanf("%s%s", &s1, &s2);
| ~^ ~~~
| | |
| char* std::string* {aka std::__cxx11::basic_string<char>*}
foo.cc:21:27: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘std::string*’ {aka ‘std::__cxx11::basic_string<char>*’} [-Wformat=]
21 | scanf("%s%s", &s1, &s2);
| ~^ ~~~
| | |
| char* std::string* {aka std::__cxx11::basic_string<char>*}