0
不幸的是,我得到了一个包含结构,导致一个问题,其中类Z需要包括类A因为继承,但Z首先被包含。 一个littlebit更加清晰:奇怪的包括依赖
A.h includes B.h
B.h includes C.h
C.h includes D.h
D.h includes Z.h
所以ž被定义A之前这将导致一个错误,说“基类未定义”。 我不能使用forward decleration,因为在每个类中我调用了包含的类的函数。
我希望有任何解决方案来解决这个问题。
看起来像你想:http://stackoverflow.com/questions/7714345/forward-declaration-with-vector-of-class-type-pointer-to-incomplete-class-type – NathanOliver