记录详情

Compile Error

foo.c:5:15: error: expected ';', ',' or ')' before '&' token
    5 | void swap(int &x,int &y)
      |               ^
foo.c: In function 'main':
foo.c:25:3: warning: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   25 |   swap(a[i],a[a[i]-1]);
      |   ^~~~
foo.c:16:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   16 |  scanf("%d",&n);
      |  ^~~~~~~~~~~~~~
foo.c:19:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   19 |   scanf("%d" ,&a[i]);
      |   ^~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1362 5B 交换瓶子
比赛
悬赏令第五周
语言
C
递交时间
2022-04-25 19:34:23
评测时间
2022-04-25 19:34:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes