开发者

deque iterator OGRE

ok si have i have the following code:

for(deque<Ogre::Vector3>::iterator iter(mWalkList.begin()); iter != mWalkList.end() ;  iter++){
            String tmpstr="Knot"+O开发者_JAVA技巧gre::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 of deque<Ogre::Vector3> (which is Ogre::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 the std::deque above.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜