QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#97096 | #3614. Math Trade | HuangHanSheng | Compile Error | / | / | C++23 | 1.4kb | 2023-04-16 15:23:39 | 2023-04-16 15:23:42 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘int main()’: answer.code:43:25: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[100]’ [-Wformat=] 43 | scanf("%s %s %s", &name[i].a, &name[i].b, &name[i].c); | ~^ ~~~~~~~~~~ | | | | char* char (*)[100] answer.code:43:28: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘char (*)[100]’ [-Wformat=] 43 | scanf("%s %s %s", &name[i].a, &name[i].b, &name[i].c); | ~^ ~~~~~~~~~~ | | | | char* char (*)[100] answer.code:43:31: warning: format ‘%s’ expects argument of type ‘char*’, but argument 4 has type ‘char (*)[100]’ [-Wformat=] 43 | scanf("%s %s %s", &name[i].a, &name[i].b, &name[i].c); | ~^ ~~~~~~~~~~ | | | | char* char (*)[100] answer.code:47:29: error: ‘strcmp’ was not declared in this scope 47 | if (strcmp(name[i].b ,name[j].b)==0) | ^~~~~~ answer.code:3:1: note: ‘strcmp’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’? 2 | #include<map> +++ |+#include <cstring> 3 | using namespace std; answer.code:60:29: error: ‘strcmp’ was not declared in this scope 60 | if (strcmp(name[i].c ,name[j].b)==0) | ^~~~~~ answer.code:60:29: note: ‘strcmp’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’? answer.code: In function ‘int dfs(int, int)’: answer.code:33:1: warning: control reaches end of non-void function [-Wreturn-type] 33 | } | ^ answer.code: In function ‘int main()’: answer.code:37:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 37 | scanf("%d",&n); | ~~~~~^~~~~~~~~ answer.code:43:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 43 | scanf("%s %s %s", &name[i].a, &name[i].b, &name[i].c); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~