记录详情

Compile Error

foo.c: In function 'InsertHead':
foo.c:23:20: error: 'new' undeclared (first use in this function); did you mean 'newp'?
   23 |         Node *newp=new Node;  newp->data=x;
      |                    ^~~
      |                    newp
foo.c:23:20: note: each undeclared identifier is reported only once for each function it appears in
foo.c:23:24: error: expected ',' or ';' before 'Node'
   23 |         Node *newp=new Node;  newp->data=x;
      |                        ^~~~
foo.c: In function 'Insert':
foo.c:40:20: error: 'new' undeclared (first use in this function); did you mean 'newp'?
   40 |         Node *newp=new Node;  newp->data=x;
      |                    ^~~
      |                    newp
foo.c:40:24: error: expected ',' or ';' before 'Node'
   40 |         Node *newp=new Node;  newp->data=x;
      |                        ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A7-5 数组的有序插入函数
比赛
2023 程序设计与竞赛(作业8:链表的世界)
语言
C
递交时间
2023-11-25 20:43:20
评测时间
2023-11-25 20:43:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes