Compile Error

foo.cc:3:1: error: ISO C++ forbids declaration of ‘x’ with no type [-fpermissive]
    3 | x(int n){
      | ^
foo.cc: In function ‘int x(int)’:
foo.cc:29:1: warning: no return statement in function returning non-void [-Wreturn-type]
   29 | }
      | ^

信息

递交者
类型
递交
题目
P1028 A6-3 最大公约数专题:多个分数的加法
比赛
2025.7.21中级班练习
语言
C++
递交时间
2025-07-21 22:02:06
评测时间
2025-07-22 11:06:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes