QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#856659#9807. Make Them BelieveGuanYunchangCompile Error//C89423b2025-01-14 15:06:062025-01-14 15:06:07

詳細信息

answer.code: In function ‘main’:
answer.code:9:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
    9 |     for(int i=0;i<8;i++)
      |     ^~~
answer.code:9:5: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code
answer.code:11:13: error: redefinition of ‘i’
   11 |     for(int i=0;i<7;i++)
      |             ^
answer.code:9:13: note: previous definition of ‘i’ with type ‘int’
    9 |     for(int i=0;i<8;i++)
      |             ^
answer.code:11:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   11 |     for(int i=0;i<7;i++)
      |     ^~~
answer.code:12:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   12 |         for(int j=0;j<7-i;j++)
      |         ^~~
answer.code:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf("%s %d",a[i].s,&a[i].score);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~