我有下面的代码,结构声明在main之前,函数声明也是
struct stuff{
int sale_per_day[Kdays];
int max_sale;
};
void set_max();
最后那部分...
void set_max(struct stuff *point; int n = 0)
{
return;
}
现在我到底做错了什么?我明白了
"ISO C forbids forward parameter declaration"
错误。根据类(class)要求,我正在使用 GCC C89。
最佳答案
看起来好像只需要一个逗号而不是分号:
void set_max(struct stuff *point, int n = 0)
关于c - 将结构指针传递给函数时出现错误 "ISO C forbids forward parameter decleration"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10455576/