Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Multidimesional maps, vectors and iterators

Reply
Thread Tools

Multidimesional maps, vectors and iterators

 
 
Sheep Sheep is offline
Junior Member
Join Date: Aug 2006
Posts: 2
 
      08-06-2006
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
 
Reply With Quote
 
 
 
 
Sheep Sheep is offline
Junior Member
Join Date: Aug 2006
Posts: 2
 
      08-14-2006
Someone.... Help.... Please?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
plain iterators and reverse iterators on vector subramanian100in@yahoo.com, India C++ 10 08-08-2009 08:28 AM
c++ primer statement about vectors containing vectors pauldepstein@att.net C++ 3 03-26-2008 06:22 PM
Sorting Multidimesional array(newbie) Tartifola Python 9 12-14-2006 08:43 AM
Ruby, SWIG and C++: how to properly wrap vector of vectors of doubles (2D vectors)? Ruby 0 09-14-2005 05:47 PM
Iterators and reverse iterators Marcin Kaliciński C++ 1 05-08-2005 09:58 AM



Advertisments