首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

CODEBLOCKS下怎么打开C99选项

2012-03-09 
CODEBLOCKS下如何打开C99选项?编译以下程序时,报错: error: for loop initial declaration used outside

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

热点排行