Reputation: 3057
I can't find what is wrong with my code in C:
error.h
#ifndef ERROR_H_INCLUDED
#define ERROR_H_INCLUDED
void myfunc(bool**,int); //error line 1
#endif
Here is the function declaration:
error.c
#include "error.h"
void myfunc(bool **rel,int num){ //error line 2
//function code here
}
The call of the function is :
main.c
#include "error.h"
int main(){
bool **rel;
int num;
myfunc(rel,num);
return 0;
}
The above code returns the error
expected ')' before '*' token
at the error line 1 and error line 2.I put the function code in comments and i still have this error.I know that, that kind of error is a missing ; or ) at the most times but i spend hours and didn't find the error.
Upvotes: 0
Views: 769
Reputation: 145829
bool
type is not recognized, you need to include stdbool.h
in your error.h
header.
Upvotes: 5