记录详情

Compile Error

foo.c:6:9: error: unknown type name 'Node'
    6 |         Node* next;
      |         ^~~~
foo.c:8:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
    8 | Node* InsertHead(Node* head, int x)
      | ^~~~
      | struct 
foo.c:8:18: error: unknown type name 'Node'
    8 | Node* InsertHead(Node* head, int x)
      |                  ^~~~
foo.c:15:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   15 | Node* Create(int a[], int n)
      | ^~~~
      | struct 
foo.c: In function 'Create':
foo.c:17:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   17 |         Node* head = NULL;
      |         ^~~~
      |         struct 
foo.c:19:24: warning: implicit declaration of function 'InsertHead' [-Wimplicit-function-declaration]
   19 |                 head = InsertHead(head, a[i]);
      |                        ^~~~~~~~~~
foo.c:19:22: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   19 |                 head = InsertHead(head, a[i]);
      |                      ^
foo.c: At top level:
foo.c:22:18: error: unknown type name 'Node'
   22 | int FindMinCount(Node* head, int n1)
      |                  ^~~~
foo.c: In function 'main':
foo.c:48:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   48 |         Node* head1 = Create(a, n1);
      |         ^~~~
      |         struct 
foo.c:49:9: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   49 |         Node* head2 = Create(b, n2);
      |         ^~~~
      |         struct 
foo.c:50:20: warning: implicit declaration of function 'FindMinCount' [-Wimplicit-function-declaration]
   50 |         int cnt1 = FindMinCount(head1, n1);
      |                    ^~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

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