记录详情

Compile Error

foo.c:5:9: error: unknown type name 'Node'
    5 |         Node* next;
      |         ^~~~
foo.c:7:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
    7 | Node* Create(int n)
      | ^~~~
      | struct 
foo.c: In function 'Create':
foo.c:9:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
    9 |         Node*head = NULL; Node*Tail = NULL;
      |         ^~~~
      |         struct 
foo.c:9:27: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
    9 |         Node*head = NULL; Node*Tail = NULL;
      |                           ^~~~
      |                           struct 
foo.c:14:17: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   14 |                 Node*newp = new Node; newp->date = x;
      |                 ^~~~
      |                 struct 
foo.c:14:29: error: 'new' undeclared (first use in this function); did you mean 'newp'?
   14 |                 Node*newp = new Node; newp->date = x;
      |                             ^~~
      |                             newp
foo.c:14:29: note: each undeclared identifier is reported only once for each function it appears in
foo.c:14:33: error: expected ',' or ';' before 'Node'
   14 |                 Node*newp = new Node; newp->date = x;
      |                                 ^~~~
foo.c:14:43: error: request for member 'date' in something not a structure or union
   14 |                 Node*newp = new Node; newp->date = x;
      |                                           ^~
foo.c:18:29: error: request for member 'next' in something not a structure or union
   18 |                         Tail->next = newp;
      |                             ^~
foo.c:22:21: error: request for member 'next' in something not a structure or union
   22 |                 Tail->next = NULL;
      |                     ^~
foo.c: At top level:
foo.c:26:16: error: unknown type name 'Node'
   26 | int FindMaxNeg(Node* head)
      |                ^~~~
foo.c: In function 'main':
foo.c:43:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   43 |         Node*head = Create(n);
      |         ^~~~
      |         struct 
foo.c:44:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   44 |         Node* head1 = Create(m);
      |         ^~~~
      |         struct 
foo.c:46:15: warning: implicit declaration of function 'FindMaxNeg' [-Wimplicit-function-declaration]
   46 |         int a=FindMaxNeg(head);
      |               ^~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A9-5 数组中最小值的个数
语言
C
递交时间
2023-11-25 16:38:26
评测时间
2023-11-25 16:38:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes