记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:12:19: error: 'malloc' was not declared in this scope
     head = (pNode)malloc(sizeof(Node));
                   ^~~~~~
foo.cc:14:18: error: 'NULL' was not declared in this scope
     head->next = NULL;
                  ^~~~
foo.cc:15:5: error: 'scanf' was not declared in this scope
     scanf("%d", &n);
     ^~~~~
foo.cc:32:9: error: 'printf' was not declared in this scope
         printf("%d ", p->data);
         ^~~~~~
foo.cc:32:9: note: suggested alternative: 'int'
         printf("%d ", p->data);
         ^~~~~~
         int
foo.cc:35:5: error: 'printf' was not declared in this scope
     printf("%d", x);
     ^~~~~~
foo.cc:35:5: note: suggested alternative: 'int'
     printf("%d", x);
     ^~~~~~
     int
foo.cc:8:23: warning: unused variable 'q' [-Wunused-variable]
     pNode head, p, s, q;
                       ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
1-3 序列循环左移
语言
C++
递交时间
2021-10-19 03:16:48
评测时间
2021-10-19 03:16:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes