记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:8:7: error: conflicting types for 'a'
  int *a = new int;
       ^
/in/foo.c:5:9: note: previous declaration of 'a' was here
     int a;
         ^
/in/foo.c:8:11: error: 'new' undeclared (first use in this function)
  int *a = new int;
           ^~~
/in/foo.c:8:11: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:8:15: error: expected ',' or ';' before 'int'
  int *a = new int;
               ^~~
/in/foo.c:9:7: error: conflicting types for 'b'
  int *b = new int;
       ^
/in/foo.c:6:6: note: previous declaration of 'b' was here
  int b;
      ^
/in/foo.c:9:15: error: expected ',' or ';' before 'int'
  int *b = new int;
               ^~~
/in/foo.c:10:2: error: unknown type name 'delete'
  delete a;
  ^~~~~~
/in/foo.c:10:9: error: conflicting types for 'a'
  delete a;
         ^
/in/foo.c:8:7: note: previous definition of 'a' was here
  int *a = new int;
       ^
/in/foo.c:11:2: error: unknown type name 'delete'
  delete b;
  ^~~~~~
/in/foo.c:11:9: error: conflicting types for 'b'
  delete b;
         ^
/in/foo.c:9:7: note: previous definition of 'b' was here
  int *b = new int;
       ^

信息

递交者
类型
自测
题目
欢迎来到南师大计算机学院OnlineJudge!
语言
C
递交时间
2019-02-24 23:36:07
评测时间
2019-02-24 23:36:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes