Cant access to a pointer-vector map element,

I have a similar question posted as an answer (and I think the post are going to be forgotted) and excuse me but I need your help:

into my private section I have :
1
2
3
vector<  vector<map<unsigned short int,col_data> > *> buffer_vectorS;
vector< map<unsigned short int,col_data> > * buffer_current;
map<unsigned short int,col_data> buffer_current_map;



Later I create a vector of map data, and save its pointer
1
2
3
vector<map<unsigned short int,col_data> > * buffer_vector = new vector<map<unsigned short int,col_data> >;
buffer_vectorS.push_back(buffer_vector);
buffer_current = buffer_vector;



Later I'd want to use the map element of the buffer_current to get-store data,
buffer_current_map = &buffer_current[index];
But this last does not compile.... I dont know how to write it...
How can I access to an item of buffer_current?
Can you help me ?
What you want to do is (*buffer_current)[index], not &buffer_current[index]. Note that will make a complete copy of the contents of the map. Probably not the best thing to do if you just want to access the data in the map.
Thanks , uf what a such simple mistake .....
Topic archived. No new replies allowed.