【发布时间】:2010-09-06 16:41:41
【问题描述】:
我正在尝试解决the 3n+1 problem 并且我有一个看起来像这样的for 循环:
for(int i = low; i <= high; ++i)
{
res = runalg(i);
if (res > highestres)
{
highestres = res;
}
}
不幸的是,当我尝试使用 GCC 进行编译时出现此错误:
3np1.c:15:错误:“for”循环初始 在 C99 模式外使用的声明
我不知道C99模式是什么。有什么想法吗?
【问题讨论】: