Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8017439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:50:43+00:00 2026-06-04T20:50:43+00:00

I have defined a Map boost::unordered_map<std::string,std::string>m_mapABC ; And I Store values in it Like

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:50:44+00:00Added an answer on June 4, 2026 at 8:50 pm

    You may want multimap instead of map.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a map defined like this std::map<some_key_type, std::string::iterator> mIteratorMap; And a huge string
I am trying to do the following: boost::unordered_map<boost::flyweight<std::string>, boost::flyweight<std::string> > map; boost::flyweight<std::string> foo(name); map[foo]
I have an std::map , and I would like to define an iterator that
I have an std:map defined as follows: std:map<std::string country, std::vector<SomeClass> events>; Holds some events
I have a managed_shared_memory objects that holds the map container SharedMap defined as follows.
What I would like to do is have a map that maps integer keys
Say I have a struct SMyStruct { int MULT; int VAL; }; std::map<std::string, SMyStuct*>
I have defined an AIDL file with my interface. Something like this: interface IResPlugin
To support user-defined key types in std::unordered_set<Key> and std::unordered_map<Key, Value> one has to provide
I have created a system that automatically registers function objects (functors) into a map

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.