【发布时间】:2011-07-04 02:50:27
【问题描述】:
我正在使用 Eclipse CDT 编写 C 程序。我想像这样初始化我的 for 循环...
for( int i = 0; i < 5; i++ )
所以我在 gcc 命令行中添加了 -std=c99。这有抛出错误的副作用:'DT_REG' undeclared (first use in this function) for the line:
if( dir_ent->d_type != DT_REG )
DT_REG 在dirent.h(包含在内)中定义。在 gcc 命令行上没有 -std=c99 的代码编译得很好。我错过了什么?
【问题讨论】:
标签: c