Hello I’m getting an error when i try to pass a char through to a function.
here is my code.
variable
char *temp;
Prototype
int checkIfUniqueCourseNo(char,int);
Call
checkIfUniqueCourseNo(temp,k);
and my error
warning: improper pointer/integer combination: arg #1
Im new to C so go easy on me 🙂
Your function accepts a
char; you are trying to pass in achar*.To fix this you need to dereference your pointer to obtain the character that it points to, so that your function receives the type of argument it expects: