timmay3141
Programmer
I have a class that I added to the workspace by creating the header file and cpp file on my own (as opposed to going to Insert...New Class). Here's what the header file is like, in short:
#if !defined(_MYCLASS_H_)
#define _MYCLASS_H_
class MyClass
{
// Stuff in here
};
#include "MyClass.cpp"
#endif
The cpp file is just definitions, with no declarations or preprocessor directives other than #include "MyClass.h". I get this error message:
fatal error C1010: unexpected end of file while looking for precompiled header directive
What is causing this? I did stuff like this all the time with a Borland compiler last year, and I never had any problems. Any ideas?
#if !defined(_MYCLASS_H_)
#define _MYCLASS_H_
class MyClass
{
// Stuff in here
};
#include "MyClass.cpp"
#endif
The cpp file is just definitions, with no declarations or preprocessor directives other than #include "MyClass.h". I get this error message:
fatal error C1010: unexpected end of file while looking for precompiled header directive
What is causing this? I did stuff like this all the time with a Borland compiler last year, and I never had any problems. Any ideas?