Jump to content
  • Advertisement
Sign in to follow this  
madRenEGadE

std::list iterator problem

This topic is 3867 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello I have the following problem: When writing this code: typedef std::list<boost::shared_ptr<OctreeNode<T> > > RootNodeList; RootNodeList::iterator i; The compiler outputs the this error: Error: expected `;' before »i« Where the hell does this come from? thx in advance

Share this post


Link to post
Share on other sites
Advertisement
Try changing it to typename RootNodeList::iterator i;

Because RootNodeList::iterator could be either a member or a type (depending on T) you have to tell the compiler to treat it as a type.

The error message isn't very helpful though.

Share this post


Link to post
Share on other sites
Ok changed to typename but now I get another error when I try to create a list from this type:

RootNodeList m_rootNodes;

The compiler says that RootNodeList does not name a type.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!