foo.cc: In member function 'bool data::scan()':
foo.cc:12:59: warning: format '%s' expects argument of type 'char*', but argument 3 has type 'char (*)[45]' [-Wformat=]
scanf("%s%s%s%c%d%a\n",num,&name,&sex,&age,&score,&address);
~~~~~ ^
foo.cc:12:59: warning: format '%c' expects argument of type 'char*', but argument 5 has type 'int*' [-Wformat=]
foo.cc:12:59: warning: format '%d' expects argument of type 'int*', but argument 6 has type 'char (*)[45]' [-Wformat=]
foo.cc:12:59: warning: format '%a' expects argument of type 'float*', but argument 7 has type 'char (*)[45]' [-Wformat=]
foo.cc:9:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",num);
~~~~~^~~~~~~~~~
foo.cc:12:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s%s%s%c%d%a\n",num,&name,&sex,&age,&score,&address);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务