Reprint: http://blog.csdn.net/typename/article/details/7173550
Declare class does not name a type
There are four possible reasons for this compilation error, which is summarized as follows:
1. The referenced class namespace does not contain
2. The referenced class header file does not contain
3. If the header file is included or has been pre-declared, the referenced class name is incorrectly written.
4. Circular Reference header file
Pre-declared features:
1. The preceding statement requires attention to the four points mentioned above
2. Use the pre-declaration as much as possible (do only header files that contain inherited classes)
3. when using a predecessor declaration, the Include header file order in the CPP file must first contain the class definition header file for the predecessor declaration, and then include the header file of the class.
Otherwise, the following compilation error will occur.
(expected constructor, destructor, or type conversion before ' typedef ')
C + + class does not name a type (reprint)