记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:4:14: warning: excess elements in scalar initializer
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
              ^
/in/foo.c:4:14: note: (near initialization for 'a')
/in/foo.c:4:17: warning: excess elements in scalar initializer
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
                 ^
/in/foo.c:4:17: note: (near initialization for 'a')
/in/foo.c:4:20: warning: excess elements in scalar initializer
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
                    ^
/in/foo.c:4:20: note: (near initialization for 'a')
/in/foo.c:4:23: warning: excess elements in scalar initializer
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
                       ^
/in/foo.c:4:23: note: (near initialization for 'a')
/in/foo.c:4:26: warning: excess elements in scalar initializer
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
                          ^
/in/foo.c:4:26: note: (near initialization for 'a')
/in/foo.c:4:29: warning: excess elements in scalar initializer
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
                             ^
/in/foo.c:4:29: note: (near initialization for 'a')
/in/foo.c:4:32: warning: excess elements in scalar initializer
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
                                ^
/in/foo.c:4:32: note: (near initialization for 'a')
/in/foo.c:4:35: warning: excess elements in scalar initializer
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
                                   ^
/in/foo.c:4:35: note: (near initialization for 'a')
/in/foo.c:4:38: warning: excess elements in scalar initializer
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
                                      ^
/in/foo.c:4:38: note: (near initialization for 'a')
/in/foo.c:7:6: error: 'cout' undeclared (first use in this function)
      cout << a[i] << " ";
      ^~~~
/in/foo.c:7:6: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:7:15: error: subscripted value is neither array nor pointer nor vector
      cout << a[i] << " ";
               ^
/in/foo.c:4:6: warning: variable 'a' set but not used [-Wunused-but-set-variable]
  int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
      ^

信息

递交者
类型
递交
比赛
泰院2401程序设计基础作业赛第四场
语言
C
递交时间
2024-11-11 17:40:55
评测时间
2024-11-11 17:40:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes