记录详情

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:12:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   12 | Node* create(int arr[], int n) {
      | ^~~~
      | struct 
foo.c: In function 'create':
foo.c:13:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   13 |         Node* head = NULL;
      |         ^~~~
      |         struct 
foo.c:16:17: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   16 |                 Node* newp = new Node;
      |                 ^~~~
      |                 struct 
foo.c:16:30: error: 'new' undeclared (first use in this function); did you mean 'newp'?
   16 |                 Node* newp = new Node;
      |                              ^~~
      |                              newp
foo.c:16:30: note: each undeclared identifier is reported only once for each function it appears in
foo.c:16:34: error: expected ',' or ';' before 'Node'
   16 |                 Node* newp = new Node;
      |                                  ^~~~
foo.c:17:21: error: request for member 'data' in something not a structure or union
   17 |                 newp->data = arr[i];
      |                     ^~
foo.c:18:21: error: request for member 'next' in something not a structure or union
   18 |                 newp->next=head;
      |                     ^~
foo.c: At top level:
foo.c:23:14: error: unknown type name 'Node'
   23 | int MinCount(Node* head) {
      |              ^~~~
foo.c: In function 'main':
foo.c:40:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   40 |         Node* head1 = NULL,*head2=NULL;
      |         ^~~~
      |         struct 
foo.c:48:16: warning: implicit declaration of function 'MinCount' [-Wimplicit-function-declaration]
   48 |         num1 = MinCount(head1);
      |                ^~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A9-5 数组中最小值的个数
比赛
2023 程序设计与竞赛(作业8:链表的世界)
语言
C
递交时间
2023-11-25 14:23:08
评测时间
2023-11-25 14:23:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes