Visual C++: Including Header Files
Posted: Sat Apr 03, 2010 1:05 pm
Hey, guys.
I'm trying to make a DOS rpg, and I want to split my code into header files (like some functions and variables) anyways,
I have the files in my project.... but it can't find them.
So, I have two files.
One, "Main" in my "Source Files" folder.
And another, "check.h" in my "Header Files" folder.
Here is the code in my Main file:
#include <stdio.h>
#include <check.h>
int ehp;
float exp;
char name[12];
int main()
{
printf("Hello, please enter your name \n ");
scanf(name);
printf("%s", name);
printf("\n");
getchar();
return 0;
}
and here is the code in my check.h file:
int hp;
int hcheck()
{
if(hp == 0 < 1)
printf("\n \a Game Over, you died");
return 0;
}
the error I get: fatal error C1083: Cannot open include file: 'check.h': No such file or directory
How do I get it to find the other file?
Thanks.
I'm trying to make a DOS rpg, and I want to split my code into header files (like some functions and variables) anyways,
I have the files in my project.... but it can't find them.
So, I have two files.
One, "Main" in my "Source Files" folder.
And another, "check.h" in my "Header Files" folder.
Here is the code in my Main file:
#include <stdio.h>
#include <check.h>
int ehp;
float exp;
char name[12];
int main()
{
printf("Hello, please enter your name \n ");
scanf(name);
printf("%s", name);
printf("\n");
getchar();
return 0;
}
and here is the code in my check.h file:
int hp;
int hcheck()
{
if(hp == 0 < 1)
printf("\n \a Game Over, you died");
return 0;
}
the error I get: fatal error C1083: Cannot open include file: 'check.h': No such file or directory
How do I get it to find the other file?
Thanks.