2 way std::map

B

bb

Hi,

Currently, am achieving 2 way mapping as follows:

typedef std::map<std::string, std::string> MapOfStrings;

MapOfStrings m1;
MapOfStrings m2;

Populating m1 & again m2 in reverse.

Is there a better way to do this using a single container?
Is there any 2 way 'map' from open source (e.g. boost) available?

Thanks.
 

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,773
Messages
2,569,594
Members
45,117
Latest member
Matilda564
Top