I have a head ache. -.-
It isn't like I've never forward declared a class before... Why is my compiler whining, and why does it have no problem with all the previous uses of the "undefined" class ENTITY.Code:class ENTITY; class UNIVERSE { public: void insert_entity(ENTITY *entity) { m_entities.push_back(entity); } void tick() { for(std::list<ENTITY*>::iterator i=m_entities.begin(); i != m_entities.end(); ++i) { (*i)->instantiate(); // use of undefined type 'RITZ::PHYS::ENTITY' } } private: std::list<ENTITY*> m_entities; }; class ENTITY { ... };



LinkBack URL
About LinkBacks


