foo.cc: In function 'int main()':
foo.cc:15:11: warning: format '%n' expects argument of type 'int*', but argument 2 has type 'char*' [-Wformat=]
15 | scanf("%n\n%s%d%d%c%c%d",&d,&x,&a,&c,&d,&e,&b);
| ~^ ~~
| | |
| int* char*
| %hhn
foo.cc:15:15: warning: format '%s' expects argument of type 'char*', but argument 3 has type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} [-Wformat=]
15 | scanf("%n\n%s%d%d%c%c%d",&d,&x,&a,&c,&d,&e,&b);
| ~^ ~~
| | |
| char* std::string* {aka std::__cxx11::basic_string<char>*}
foo.cc:15:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
15 | scanf("%n\n%s%d%d%c%c%d",&d,&x,&a,&c,&d,&e,&b);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务