Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

stl mistake.

This topic is 5809 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

i got a weird mistake, here it is: i declare : vector<IDrawable* > pDisplayList; then when i want to do a for loop to pass through it, this line: vector::iterator i; gave me that mistake i don't understand: error C2653: 'vector >' : is not a class or namespace name thanks for your help. [edited by - siddim on June 26, 2002 2:27:22 PM]

Share this post


Link to post
Share on other sites
Advertisement
declare it as:

vector<data_type >pDisplayList;

Crispy

edit: html...

[edited by - Crispy on June 26, 2002 2:24:05 PM]

Share this post


Link to post
Share on other sites
To be over correct it should be:

std::vector<IDrawable*> pDisplayList;

and the itarator:

std::vector<IDrawable*>::iterator i;



[edited by - baumep on June 26, 2002 2:32:45 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
or to allow you to strip off the stds put:
using namespace std;

Share this post


Link to post
Share on other sites
Or use typedefs to make everything clean:


typedef std::vector<IDrawable*> Drawables;
...
Drawables::iterator i;


[edited by - Anon Mike on June 26, 2002 5:22:48 PM]

Share this post


Link to post
Share on other sites

  • 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!