Hi all,
I know this is something obvious, but I need another pair of eyes to look at it and tell me what I'm doing. I have some class methods declared like this:Then over in my cpp I'm implementing them like this:Code:#include "aspect.h" //defines Aspect #include <map> #include <string> namespace sge { typdef std::map<std::string, Aspect*> StringAspectMap; class Object { private: StringAspectMap aspectDict; public: void initAspects(); void updateAspects(float dtime); void destroyAspects(); }; }Now when I compile this, I get:Code:#include "object.h" using namespace sge; void Object::initAspects() { for (StringAspectMap::iterator itr = aspectDict.begin(); itr != apsectDict.end(); ++itr) itr->second->init(); } void Object::updateAspects(float dtime) { for (StringAspectMap::iterator itr = aspectDict.begin(); itr != apsectDict.end(); ++itr) itr->second->update(dtime); } void Object::destroyAspects() { for (StringAspectMap::iterator itr = aspectDict.begin(); itr != apsectDict.end(); ++itr) itr->second->destroy(); }This doesn't make any sense to me. I'm in the right namespace, in the right class, implementing functions that I know I prototyped, but they can't see my private data. Can anyone see what I'm doing wrong?../code/src/object.cpp: In member function ‘void sge::Object::initAspects()’:
../code/src/object.cpp:183: error: ‘apsectDict’ was not declared in this scope
../code/src/object.cpp: In member function ‘void sge::Object::updateAspects(float)’:
../code/src/object.cpp:188: error: ‘apsectDict’ was not declared in this scope
../code/src/object.cpp: In member function ‘void sge::Object::destroyAspects()’:
../code/src/object.cpp:193: error: ‘apsectDict’ was not declared in this scope



LinkBack URL
About LinkBacks


