ok si have i have the following code:
for(deque<Ogre::Vector3>::iterator iter(mWalkList.begin()); iter != mWalkList.end() ; iter++){
String tmpstr="Knot"+Ogre::StringConverter::toString(n);
ent = mSceneMgr->createEntity(tmpstr, "knot.mesh");
tmpstr = "Knot"+Ogre::StringConverter::toString(n)+"Node";
node = mSceneMgr->getRootSceneNode()->createChildSceneNode(tmpstr,*iter);
node->attachObject(ent);
node->setScale(0.1f, 0.1f, 0.1f);
n++;
}
But visual studio gives me a error when i hover hover iterator iter which says the following: Error: class "Ogre::deque<Ogre::Vector3, Ogre::STLAllocator<Ogre::Vector3, Ogre::GeneralAllocPolicy>>" has no member 'iterator'
what am i doing wrong,
sorry im new to Ogre and C++ for that matter, Its a school project so i would really appreciate some help.
Try using
std::deque<Ogre::Vector3>instead ofdeque<Ogre::Vector3>(which isOgre::deque<Ogre::Vector3>in this case).Or you can use
Ogre::deque<Ogre::Vector3>::type. The docs seem to say that is the same as thestd::dequeabove.