F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_34013789_3765.c:11:5: error: variably modified 'prime' at file scope
 int prime[maxn];
     ^
0_0_34013789_3765.c:12:1: error: unknown type name 'bool'
 bool isprime[maxn];
 ^
0_0_34013789_3765.c:12:6: error: variably modified 'isprime' at file scope
 bool isprime[maxn];
      ^
0_0_34013789_3765.c: In function 'solve':
0_0_34013789_3765.c:17:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for(int i = 0; i < maxn; i++)
     ^
0_0_34013789_3765.c:17:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_34013789_3765.c:23:13: error: redefinition of 'i'
     for(int i = 2; i <= maxn; i++)
             ^
0_0_34013789_3765.c:17:13: note: previous definition of 'i' was here
     for(int i = 0; i < maxn; i++)
             ^
0_0_34013789_3765.c:23:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for(int i = 2; i <= maxn; i++)
     ^
0_0_34013789_3765.c:28:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
         for(int j = 1; j <= cnt; j++)
         ^
0_0_34013789_3765.c:30:13: error: expected expression before '/' token
             //printf("%d\n", j);
             ^
0_0_34013789_3765.c: In function 'main':
0_0_34013789_3765.c:45:5: error: expected expression before '/' token
     // for(int i = 1; i <= cnt; i++)
     ^
0_0_34013789_3765.c:50:18: error: 't' undeclared (first use in this function)
     scanf("%d", &t);
                  ^
0_0_34013789_3765.c:50:18: note: each undeclared identifier is reported only once for each function it appears in
0_0_34013789_3765.c:56:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
         for(int i = 1; i <= n; i++)
         ^
0_0_34013789_3765.c:67:13: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
             for(int j = 1; j <= cnt; j++)
             ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-07-04 03:05:36, Gzip enabled