foo.cc: In function 'int main()':
foo.cc:19:17: error: 'strcpy' was not declared in this scope
19 | strcpy(temp2,b[i]);strcpy(b[i],b[j]);strcpy(b[j],temp2);
| ^~~~~~
foo.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
1 | #include <iostream>
+++ |+#include <cstring>
2 | using namespace std;
foo.cc:23:23: error: 'strcmp' was not declared in this scope
23 | int s=strcmp(b[i],b[j]);
| ^~~~~~
foo.cc:23:23: note: 'strcmp' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
foo.cc:26:21: error: 'strcpy' was not declared in this scope
26 | strcpy(temp2,b[i]);strcpy(b[i],b[j]);strcpy(b[j],temp2);
| ^~~~~~
foo.cc:26:21: note: 'strcpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
foo.cc: In function 'int mystrcmp(char*, char*)':
foo.cc:38:11: error: 'strlen' was not declared in this scope
38 | int A=strlen(a);
| ^~~~~~
foo.cc:38:11: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
foo.cc:43:15: error: 'strcmp' was not declared in this scope
43 | int t=strcmp(a,b);
| ^~~~~~
foo.cc:43:15: note: 'strcmp' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
foo.cc: In function 'int main()':
foo.cc:11:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
11 | scanf("%s",b[i]);
| ~~~~~^~~~~~~~~~~
foo.cc:12:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
12 | scanf("%s",a[i]);
| ~~~~~^~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务