Compile Error

foo.cc: In function ‘int num(int, int)’:
foo.cc:11:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   11 | int main()
      |         ^~
foo.cc:11:9: note: remove parentheses to default-initialize a variable
   11 | int main()
      |         ^~
      |         --
foo.cc:11:9: note: or replace parentheses with braces to value-initialize a variable
foo.cc:12:1: error: a function-definition is not allowed here before ‘{’ token
   12 | {
      | ^
foo.cc:17:2: error: expected ‘}’ at end of input
   17 | }
      |  ^
foo.cc:4:1: note: to match this ‘{’
    4 | {
      | ^
foo.cc:17:2: warning: no return statement in function returning non-void [-Wreturn-type]
   17 | }
      |  ^

信息

递交者
类型
自测
题目
P2774 计数2级2 2024.6
语言
C++
递交时间
2025-07-23 08:58:50
评测时间
2025-07-23 08:58:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes