foo.cc:10:12: error: 'Tom' was not declared in this scope
  char name[Tom];
            ^~~
foo.cc: In function 'int main()':
foo.cc:18:16: error: 'Mary' was not declared in this scope
  char names[N][Mary];
                ^~~~
foo.cc:22:38: error: 'struct SR' has no member named 'name'
   scanf("%d%s%s%d",&rec[i].id,rec[i].name,rec[i].phone,&rec[i].secs);
                                      ^~~~
foo.cc:16:10: warning: unused variable 'k' [-Wunused-variable]
  int n,i,k,flag,index;
          ^
foo.cc:16:12: warning: unused variable 'flag' [-Wunused-variable]
  int n,i,k,flag,index;
            ^~~~
   
  
    [Hydro](https://hydro.ac)提供评测服务