foo.cc: In function 'int main()':
foo.cc:24:68: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'char (*)[20]' [-Wformat=]
scanf("%d %s %d %f",&sr[i].id,sr[i].name,&sr[i].phone,&sr[i].secs);
~~~~~~~~~~~~ ^
foo.cc:24:68: warning: format '%f' expects argument of type 'float*', but argument 5 has type 'int*' [-Wformat=]
foo.cc:24:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %s %d %f",&sr[i].id,sr[i].name,&sr[i].phone,&sr[i].secs);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:18:15: warning: 'k' may be used uninitialized in this function [-Wmaybe-uninitialized]
int i,flag,j,k,n;
^
[Hydro](https://hydro.ac)提供评测服务