Multidimesional maps, vectors and iterators

Joined
Aug 6, 2006
Messages
2
Reaction score
0
I've got a problem:

I declared the map as
std::map<int, std::vector<SDL_Surface*> > surfaces;

The map is for layer 1, layer 2, etc. The vector inside contains the surfaces...
Now I have an iterator:

std::map<int, std::vector<SDL_Surface*> >::iterator curLayer = surfaces.begin();

Then I have another iteraror:
std::vector<SDL_Surface*>::iterator curItem;

Now this line generates an error:
curItem = (*curLayer).begin();

The error is a long sentence with the end 'does not contain a member named begin()'

Does anyone know how to solve this?

Greetz,
Vincent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top