Dch*_*ris 0 c prototype compiler-errors function header-files
我在C中找不到我的代码有什么问题:
error.h
#ifndef ERROR_H_INCLUDED
#define ERROR_H_INCLUDED
void myfunc(bool**,int); //error line 1
#endif
Run Code Online (Sandbox Code Playgroud)
这是函数声明:
error.c
#include "error.h"
void myfunc(bool **rel,int num){ //error line 2
//function code here
}
Run Code Online (Sandbox Code Playgroud)
该函数的调用是:
main.c中
#include "error.h"
int main(){
bool **rel;
int num;
myfunc(rel,num);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
上面的代码返回错误
预期')'在'*'之前
在错误行1和错误行2.我把功能代码放在注释中,我仍然有这个错误.我知道,这种错误是一个缺失; 或者)在大多数时间,但我花了几个小时,但没有发现错误.
| 归档时间: |
|
| 查看次数: |
721 次 |
| 最近记录: |