/ Vijos /

记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:5: error: unknown type name 'bool'
     bool a[105];
     ^
foo.c:8:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for(int i = 1;1 < 101;i++) a[i] = false; 
     ^
foo.c:8:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
foo.c:8:39: error: 'false' undeclared (first use in this function)
     for(int i = 1;1 < 101;i++) a[i] = false; 
                                       ^
foo.c:8:39: note: each undeclared identifier is reported only once for each function it appears in
foo.c:10:13: error: redefinition of 'i'
     for(int i = 1;i <= n;i++)
             ^
foo.c:8:13: note: previous definition of 'i' was here
     for(int i = 1;1 < 101;i++) a[i] = false; 
             ^
foo.c:10:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for(int i = 1;i <= n;i++)
     ^
foo.c:13:19: error: 'true' undeclared (first use in this function)
            a[m] = true;
                   ^
foo.c:15:13: error: redefinition of 'i'
     for(int i = 1;i < 101;i++)
             ^
foo.c:10:13: note: previous definition of 'i' was here
     for(int i = 1;i <= n;i++)
             ^
foo.c:15:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for(int i = 1;i < 101;i++)
     ^

信息

递交者
类型
递交
题目
P1316 明明的随机数
语言
C
递交时间
2015-06-28 10:44:37
评测时间
2015-06-28 10:44:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes