记录详情

Compile Error

foo.c:4:9: error: unknown type name 'Node'
    4 |         Node* next;
      |         ^~~~
foo.c:6:13: error: unknown type name 'Node'
    6 | void Output(Node* head) {
      |             ^~~~
foo.c:13:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   13 | Node* Unique(Node* head) {
      | ^~~~
      | struct 
foo.c:13:14: error: unknown type name 'Node'
   13 | Node* Unique(Node* head) {
      |              ^~~~
foo.c:30:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   30 | Node* create2(int arr1[], int arr2[], int n1, int n2) {
      | ^~~~
      | struct 
foo.c: In function 'create2':
foo.c:31:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   31 |         Node* head = NULL;
      |         ^~~~
      |         struct 
foo.c:33:17: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   33 |                 Node* newp = new Node;
      |                 ^~~~
      |                 struct 
foo.c:33:30: error: 'new' undeclared (first use in this function); did you mean 'newp'?
   33 |                 Node* newp = new Node;
      |                              ^~~
      |                              newp
foo.c:33:30: note: each undeclared identifier is reported only once for each function it appears in
foo.c:33:34: error: expected ',' or ';' before 'Node'
   33 |                 Node* newp = new Node;
      |                                  ^~~~
foo.c:34:21: error: request for member 'data' in something not a structure or union
   34 |                 newp->data = arr2[i];
      |                     ^~
foo.c:35:21: error: request for member 'next' in something not a structure or union
   35 |                 newp->next = head;
      |                     ^~
foo.c:39:17: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   39 |                 Node* newp = new Node;
      |                 ^~~~
      |                 struct 
foo.c:39:34: error: expected ',' or ';' before 'Node'
   39 |                 Node* newp = new Node;
      |                                  ^~~~
foo.c:40:21: error: request for member 'data' in something not a structure or union
   40 |                 newp->data = arr1[i];
      |                     ^~
foo.c:41:21: error: request for member 'next' in something not a structure or union
   41 |                 newp->next = head;
      |                     ^~
foo.c: In function 'main':
foo.c:47:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   47 |         Node *head1 = NULL,*head2=NULL,*head3=NULL,*head4=NULL,*head5=NULL;
      |         ^~~~
      |         struct 
foo.c:58:17: warning: implicit declaration of function 'Unique' [-Wimplicit-function-declaration]
   58 |         head4 = Unique(head4);
      |                 ^~~~~~
foo.c:58:15: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   58 |         head4 = Unique(head4);
      |               ^
foo.c:59:15: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   59 |         head5 = Unique(head5);
      |               ^
foo.c:60:9: warning: implicit declaration of function 'Output' [-Wimplicit-function-declaration]
   60 |         Output(head4);
      |         ^~~~~~
foo.c:47:41: warning: unused variable 'head3' [-Wunused-variable]
   47 |         Node *head1 = NULL,*head2=NULL,*head3=NULL,*head4=NULL,*head5=NULL;
      |                                         ^~~~~
foo.c:47:29: warning: unused variable 'head2' [-Wunused-variable]
   47 |         Node *head1 = NULL,*head2=NULL,*head3=NULL,*head4=NULL,*head5=NULL;
      |                             ^~~~~
foo.c:47:15: warning: unused variable 'head1' [-Wunused-variable]
   47 |         Node *head1 = NULL,*head2=NULL,*head3=NULL,*head4=NULL,*head5=NULL;
      |               ^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

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