stl mistake.
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]
declare it as:
vector<data_type >pDisplayList
Crispy
edit: html...
[edited by - Crispy on June 26, 2002 2:24:05 PM]
vector<data_type >pDisplayList
Crispy
edit: html...
[edited by - Crispy on June 26, 2002 2:24:05 PM]
To be over correct it should be:
and the itarator:
[edited by - baumep on June 26, 2002 2:32:45 PM]
std::vector<IDrawable*> pDisplayList;
and the itarator:
std::vector<IDrawable*>::iterator i;
[edited by - baumep on June 26, 2002 2:32:45 PM]
Or use typedefs to make everything clean:
[edited by - Anon Mike on June 26, 2002 5:22:48 PM]
typedef std::vector<IDrawable*> Drawables;...Drawables::iterator i;
[edited by - Anon Mike on June 26, 2002 5:22:48 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement