Compile Error

/in/foo.c:5:2: error: unknown type name 'Node'
  Node* next;
  ^~~~
/in/foo.c:7:1: error: unknown type name 'Node'
 Node* Create(int n)
 ^~~~
/in/foo.c:7:1: note: use 'struct' keyword to refer to the type
/in/foo.c: In function 'Create':
/in/foo.c:9:2: error: unknown type name 'Node'
  Node* head = NULL; Node* Tail = NULL;
  ^~~~
/in/foo.c:9:2: note: use 'struct' keyword to refer to the type
/in/foo.c:9:21: error: unknown type name 'Node'
  Node* head = NULL; Node* Tail = NULL;
                     ^~~~
/in/foo.c:9:21: note: use 'struct' keyword to refer to the type
/in/foo.c:13:3: warning: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
   scanf_s("%d", &x);
   ^~~~~~~
/in/foo.c:14:3: error: unknown type name 'Node'
   Node*newp = new Node; newp->date = x;
   ^~~~
/in/foo.c:14:3: note: use 'struct' keyword to refer to the type
/in/foo.c:14:15: error: 'new' undeclared (first use in this function)
   Node*newp = new Node; newp->date = x;
               ^~~
/in/foo.c:14:15: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:14:19: error: expected ',' or ';' before 'Node'
   Node*newp = new Node; newp->date = x;
                   ^~~~
/in/foo.c:14:29: error: request for member 'date' in something not a structure or union
   Node*newp = new Node; newp->date = x;
                             ^~
/in/foo.c:18:8: error: request for member 'next' in something not a structure or union
    Tail->next = newp;
        ^~
/in/foo.c:22:7: error: request for member 'next' in something not a structure or union
   Tail->next = NULL;
       ^~
/in/foo.c: At top level:
/in/foo.c:25:12: error: unknown type name 'Node'
 int search(Node*head,int x)
            ^~~~
/in/foo.c: In function 'main':
/in/foo.c:41:2: error: unknown type name 'Node'
  Node*head = Create(n);
  ^~~~
/in/foo.c:41:2: note: use 'struct' keyword to refer to the type
/in/foo.c:46:10: warning: implicit declaration of function 'search' [-Wimplicit-function-declaration]
  int cnt=search(head, x);
          ^~~~~~

信息

递交者
类型
递交
题目
P1047 A7-4 数组的查找函数
语言
C
递交时间
2023-11-25 09:39:50
评测时间
2023-11-25 09:39:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes