Compile Error

foo.cc:17:2: error: expected ';' after struct definition
 }
  ^
  ;
foo.cc: In function 'int main()':
foo.cc:35:14: error: 'sr' was not declared in this scope
    if(strcmp(sr[i].name,st[j].name)==0)
              ^~
foo.cc:35:14: note: suggested alternative: 'st'
    if(strcmp(sr[i].name,st[j].name)==0)
              ^~
              st
foo.cc:42:22: error: 'sr' was not declared in this scope
    strcpy(st[k].name,sr[i].name);
                      ^~
foo.cc:42:22: note: suggested alternative: 'st'
    strcpy(st[k].name,sr[i].name);
                      ^~
                      st
foo.cc:51:25: error: 'sr' was not declared in this scope
    if(strcmp(st[i].name,sr[j].name)==0)
                         ^~
foo.cc:51:25: note: suggested alternative: 'st'
    if(strcmp(st[i].name,sr[j].name)==0)
                         ^~
                         st
foo.cc:65:13: error: 'temp' was not declared in this scope
     st[j+1]=temp;
             ^~~~
foo.cc:65:13: note: suggested alternative: 'trmp'
     st[j+1]=temp;
             ^~~~
             trmp
foo.cc:27:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%s%s%d",&rec[i].id,rec[i].name,rec[i].phone,&rec[i].secs);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1154 结构体-手机通话记录2
语言
C++
递交时间
2021-11-14 16:03:40
评测时间
2021-11-14 16:03:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes