foo.cc: In function 'int main()':
foo.cc:7:13: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[200]' [-Wformat=]
7 | scanf("%s",&a);
| ~^ ~~
| | |
| | char (*)[200]
| char*
foo.cc:49:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
49 | for(i=0;i<num;i++){
| ^~~
foo.cc:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
7 | scanf("%s",&a);
| ~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务