记录详情

Compile Error

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

信息

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