记录详情

Compile Error

foo.c: In function 'createNode':
foo.c:11:5: error: 'newN' undeclared (first use in this function); did you mean 'newNode'?
   11 |     newN->data = value;
      |     ^~~~
      |     newNode
foo.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:10:8: warning: unused variable 'newNode' [-Wunused-variable]
   10 |     N* newNode = (N*)malloc(sizeof(N));
      |        ^~~~~~~
foo.c: At top level:
foo.c:15:1: error: unknown type name 'Node'
   15 | Node* findNode(N* head, int value)
      | ^~~~
foo.c: In function 'findNode':
foo.c:22:20: warning: returning 'N *' from a function with incompatible return type 'int *' [-Wincompatible-pointer-types]
   22 |             return current;
      |                    ^~~~~~~
foo.c: In function 'insertN':
foo.c:31:9: warning: implicit declaration of function 'findN'; did you mean 'findNode'? [-Wimplicit-function-declaration]
   31 |     if (findN(*head, value) != NULL)
      |         ^~~~~
      |         findNode
foo.c:31:29: warning: comparison between pointer and integer
   31 |     if (findN(*head, value) != NULL)
      |                             ^~
foo.c:35:15: warning: implicit declaration of function 'createN'; did you mean 'createNode'? [-Wimplicit-function-declaration]
   35 |     N* newN = createN(value);
      |               ^~~~~~~
      |               createNode
foo.c:35:15: warning: initialization of 'N *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
foo.c: In function 'SetInter':
foo.c:56:42: warning: comparison between pointer and integer
   56 |         if (findN(head2, current1->data) != NULL)
      |                                          ^~
foo.c: In function 'createNode':
foo.c:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2023 程序设计与竞赛(作业8:链表的世界)
语言
C
递交时间
2023-11-25 23:27:40
评测时间
2023-11-25 23:27:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes