C++ circular include
问题 I can't solve this circular dependency problem; always getting this error: "invalid use of incomplete type struct GemsGame" I don't know why the compiler doesn't know the declaration of GemsGame even if I included gemsgame.h Both classes depend on each other (GemsGame store a vector of GemElements, and GemElements need to access this same vector) Here is partial code of GEMELEMENT.H: #ifndef GEMELEMENT_H_INCLUDED #define GEMELEMENT_H_INCLUDED #include "GemsGame.h" class GemsGame; class