/ Vijos /

记录详情

Compile Error

foo.c:6:1: error: unknown type name 'Node'
 Node* add(Node *a,Node *b){
 ^
foo.c:6:11: error: unknown type name 'Node'
 Node* add(Node *a,Node *b){
           ^
foo.c:6:19: error: unknown type name 'Node'
 Node* add(Node *a,Node *b){
                   ^
foo.c: In function 'main':
foo.c:13:5: error: unknown type name 'Node'
     Node *a, *b;
     ^
foo.c:14:5: error: 'Node' undeclared (first use in this function)
  a=(Node*)malloc(sizeof(Node));
     ^
foo.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:14:10: error: expected expression before ')' token
  a=(Node*)malloc(sizeof(Node));
          ^
foo.c:15:10: error: expected expression before ')' token
  b=(Node*)malloc(sizeof(Node));
          ^
foo.c:16:21: error: request for member 'n' in something not a structure or union
     scanf("%d%d", &a->n, &b->n);
                     ^
foo.c:16:28: error: request for member 'n' in something not a structure or union
     scanf("%d%d", &a->n, &b->n);
                            ^
foo.c:17:8: error: 'c' undeclared (first use in this function)
  Node *c=add(a,b);
        ^
foo.c:17:2: warning: implicit declaration of function 'add' [-Wimplicit-function-declaration]
  Node *c=add(a,b);
  ^

信息

递交者
类型
递交
题目
P1000 A+B Problem
语言
C
递交时间
2015-03-19 23:06:25
评测时间
2015-03-19 23:06:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes