CODEBLOCKS下如何打开C99选项?
编译以下程序时,报错: error: 'for' loop initial declaration used outside C99 mode
这样处理以后,仍然不能解决问题呢:gcc -std=c99
#include <stdio.h>
int main( void )
{
while(8)
{
for(int i=0;i<99999;i++)
printf("i=%05d\r",i);
}
return 0;
}
[解决办法]
setting->compiler and deguger settings->compiler settings->other options下面写下-std=c99