VS 2008, C++, Windows XP, MFC project
In the main application file C_AR2_MessagesAppDlg.h is:
The point is to declare pointers to the classes as they will be used for a while then deleted. The first one is fine, the second one solicits the error:
There is something simple prohibiting the compiler from seeing this class and I just cannot detect it.
We need to know what a dragon is
before we study its anatomy.
(Bryan Kelly, 2010)
In the main application file C_AR2_MessagesAppDlg.h is:
Code:
#include "C_AR2_Configuration.h" // class of same name
#include "C_AR2_Messages.h" // ditto
...
public:
C_AR2_Configuration *m_configuration; // OK
C_AR2_Messages.h *m_messages; // syntax error
The point is to declare pointers to the classes as they will be used for a while then deleted. The first one is fine, the second one solicits the error:
When the second is commented out there are no compile errors. I presume that the compiler cannot see class C_AR2_Messages. I have carefully compared names and spellings. I even used copy paste to put the class name into the declaration to avoid any typos. I went back and performed an add existing item for the class for both the .h and .cpp file to no effect.C2143: syntax error: missing ; before *
There is something simple prohibiting the compiler from seeing this class and I just cannot detect it.
We need to know what a dragon is
before we study its anatomy.
(Bryan Kelly, 2010)