I’m inserting values into a vector:
vector<map<vector<string> , vector<string> > > listedParameterMap;
like this:
listedParameterMap.insert(listedParameterMap.end(), 1, parameterMap);
If I check later the vector, the order is inverted.
Did I miss something?
EDIT:
I think it may be somewhere else… I just got an idea. But I’ll try tomorrow.
I almost had today aleady at least one brain-stackoverflow with my code 😉
Anyway thank you all for helping. I’ll tell if somthing changes!
EDIT2:
Seems like the error is somewhere else. I just could see where it happens, but until now not why. On a point where the map should get filled just once, it gets filled twice.
For some reason each time only on a specific value. That’s why it was looking like the values are inverted.
If I need some help I’ll open a new question.
Thanks to everyone!
UPDATE:
The vector is ok now. Found the problem. Blindness of own code 😉
It doen’t influence my programm my the map is inverted.
I just created a new map inserting and then printing the values, this works then as expected.
Why don’t you simply write:
It’s simpler interface than what you’re doing in your post.