/ OPS /

记录详情

Compile Error

/in/foo.cc: In function 'bool cmpx(fruit, fruit)':
/in/foo.cc:10:9: error: 'strcmp' was not declared in this scope
   10 |     if (strcmp(x.pla , y.pla)==0) {
      |         ^~~~~~
/in/foo.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
/in/foo.cc:13:12: error: 'strcmp' was not declared in this scope
   13 |     return strcmp(x.pla, y.pla)<0;
      |            ^~~~~~
/in/foo.cc:13:12: note: 'strcmp' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
/in/foo.cc: In function 'int main()':
/in/foo.cc:30:17: error: 'strcmp' was not declared in this scope
   30 |             if (strcmp(arr[j].pla, arr[j + 1].pla) == 0 && strcmp(arr[j].nam, arr[j + 1].nam) == 0) {
      |                 ^~~~~~
/in/foo.cc:30:17: note: 'strcmp' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
/in/foo.cc:41:22: error: 'strcmp' was not declared in this scope
   41 |             else if (strcmp(arr[j - 1].pla, arr[j].pla) != 0) {
      |                      ^~~~~~
/in/foo.cc:41:22: note: 'strcmp' is defined in header '<cstring>'; did you forget to '#include <cstring>'?

信息

递交者
类型
递交
题目
P1107 水果
语言
C++
递交时间
2024-03-26 10:48:10
评测时间
2024-03-26 10:48:10
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes