Compile Error

/in/foo.cc:3:14: error: redefinition of 'int a [4]'
    3 | int a[4];int a[4];
      |              ^
/in/foo.cc:3:5: note: 'int a [4]' previously declared here
    3 | int a[4];int a[4];
      |     ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:4:20: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    4 | int main(){int main(){
      |                    ^~
/in/foo.cc:4:20: note: remove parentheses to default-initialize a variable
    4 | int main(){int main(){
      |                    ^~
      |                    --
/in/foo.cc:4:20: note: or replace parentheses with braces to value-initialize a variable
/in/foo.cc:4:22: error: a function-definition is not allowed here before '{' token
    4 | int main(){int main(){
      |                      ^
/in/foo.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
/in/foo.cc:4:11: note: to match this '{'
    4 | int main(){int main(){
      |           ^

信息

递交者
类型
递交
题目
P1058 A1-2 分支结构练习:三数的特征值
语言
C++
递交时间
2026-07-23 22:22:59
评测时间
2026-07-23 22:22:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes