Im trying out using headers, and it seems that my program cant find anything in it.
Every time I try to use a function in my header, my compiler just says that its undeclared and wont compile. Accually, it says nothing in my header is undeclared. Am I supposed to use something special in my file other then ' #include"check.h" ' or what?Code://in filecheck.cpp
if (check("test.txt")) {
[does this]
}
//in check.h
int check(const char *filename) {
FILE* fp;
if ((fp = fopen( filename, "r")) != NULL) {
fclose(fp);
return 1;
}
return 0;
}