记录详情

Compile Error

foo.c: In function 'main':
foo.c:10:4: error: 'new' undeclared (first use in this function)
   10 |  p=new int[n];
      |    ^~~
foo.c:10:4: note: each undeclared identifier is reported only once for each function it appears in
foo.c:10:7: error: expected ';' before 'int'
   10 |  p=new int[n];
      |       ^~~~
      |       ;
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    9 |  scanf("%d%d",&n,&m);
      |  ^~~~~~~~~~~~~~~~~~~
foo.c:13:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   13 |   scanf("%d",&p[i]);
      |   ^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
6-1 和为定值的数对
比赛
2021(四) 作业第四场:加速赛
语言
C
递交时间
2021-12-08 15:30:11
评测时间
2021-12-08 15:30:11
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes