Can''t compile - Get can''t find include error
In Microsoft Visual C++ 2005 Express Edition I have two .cpp files and two .h files. When I compile it says it can't find the include files. WHY? They are sitting right there in the project!
In Microsoft Visual C++ 2005 Express Edition I have two .cpp files and two .h files. When I compile it says it can't find the include files. WHY? They are sitting right there in the project!
Probably you are trying to include the file using "< >" notation: #include <MyFile.h>. This is suitable for system include files. For your files you have to use another form:
#include "MyFile.h"
I hope this helps.
Do you have your .cpp files and .h files in the same directory? If you put the .h files in one directory and .cpp file another directory, the compiler will not be able to find the header file unless you add the directory to you include path.