记录详情

Compile Error

/in/foo.c:6:2: error: unknown type name 'Node'
  Node*next;
  ^~~~
/in/foo.c:8:1: error: unknown type name 'Node'
 Node *Create(char s[])
 ^~~~
/in/foo.c:8:1: note: use 'struct' keyword to refer to the type
/in/foo.c: In function 'Create':
/in/foo.c:11:2: error: unknown type name 'Node'
  Node*head;
  ^~~~
/in/foo.c:11:2: note: use 'struct' keyword to refer to the type
/in/foo.c:12:2: error: unknown type name 'Node'
  Node*p=head;
  ^~~~
/in/foo.c:12:2: note: use 'struct' keyword to refer to the type
/in/foo.c:15:3: error: unknown type name 'Node'
   Node*newp=(Node*)malloc(sizeof(Node));
   ^~~~
/in/foo.c:15:3: note: use 'struct' keyword to refer to the type
/in/foo.c:15:14: error: 'Node' undeclared (first use in this function)
   Node*newp=(Node*)malloc(sizeof(Node));
              ^~~~
/in/foo.c:15:14: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:15:19: error: expected expression before ')' token
   Node*newp=(Node*)malloc(sizeof(Node));
                   ^
/in/foo.c:16:7: error: request for member 'data' in something not a structure or union
   newp->data=s[i];
       ^~
/in/foo.c:18:7: error: request for member 'next' in something not a structure or union
   newp->next=NULL;
       ^~
/in/foo.c:19:4: error: request for member 'next' in something not a structure or union
   p->next=newp;
    ^~
/in/foo.c: At top level:
/in/foo.c:25:14: error: unknown type name 'Node'
 void shanchu(Node*head,char t[])
              ^~~~
/in/foo.c:49:13: error: unknown type name 'Node'
 void Output(Node*head)
             ^~~~
/in/foo.c: In function 'main':
/in/foo.c:57:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
  gets(s);
  ^~~~
In file included from /in/foo.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.c:59:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
  gets(t);
  ^~~~
In file included from /in/foo.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.c:60:2: error: unknown type name 'Node'
  Node*heads=Create(s);
  ^~~~
/in/foo.c:60:2: note: use 'struct' keyword to refer to the type
/in/foo.c:61:2: warning: implicit declaration of function 'shanchu' [-Wimplicit-function-declaration]
  shanchu(heads,t);
  ^~~~~~~
/in/foo.c:62:2: warning: implicit declaration of function 'Output' [-Wimplicit-function-declaration]
  Output(heads);
  ^~~~~~

信息

递交者
类型
递交
题目
P1556 Problem 8A. 兄妹的密文
语言
C
递交时间
2023-12-10 16:36:55
评测时间
2023-12-10 16:36:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes