I have defined a Map
boost::unordered_map<"std::string,std::string">m_mapABC ;
And I Store values in it Like m_mapABC[strValue1]=strValue2;
And Assume that i store 10 entries to the map.In that case can the same Key Value be used to store 10 different Values..or will it be over written every time...I guess it would.
In that case using std::pair
would help i guess.
std::map<"std::string, std::pair<"std::string", bool>>myMap2
std::pair
can have 2 Key Values Equal(I guess I am Right)...What will be the bool value in each case,will it be TRUE in the first case and FALSE the second time or vice-versa?.
I also heard about std::tuple
or boost::tuple
where a single Key can be used to Store Different Values.
I am not very clear about how to iterate through them...i need help
You may want multimap
instead of map
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With