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 8122795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:56:59+00:00 2026-06-06T05:56:59+00:00

Is there an alternative container that has the same functionality as std::map but it

  • 0

Is there an alternative container that has the same functionality as std::map but it dose not automatically sort the contents? As std::map is a “ordered” container.

I have a problem were as I add things to the std::map bar; The string list is automatically getting sorted in alphabetical order.

Everything else in my program works fine.

What I am wondering is if there is a container that has teh exact same functionality as std::map but is not ordered.. so I can do a search and replace std::map with ???:??

Anything like that?

Thanks in advance
–Jynks

  • 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-06T05:57:01+00:00Added an answer on June 6, 2026 at 5:57 am

    There is an std::unordered_map container available starting with C++11. Many compilers that are not yet fully C++11 compatible support it as well. This container does not order your items alphabetically, but being an associative container, it is not required to preserve the insertion (or any other) order of the items.

    If you would like to preserve some order of the items in the container and also have it work as an associative container (i.e. a map) you can build your own container as a combination of a linked list and an unsorted map, similar to Java’s LinkedHashMap.

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

Sidebar

Related Questions

Is there an alternative version of std::find_if that returns an iterator over all found
Is there an alternative ActionScript 3 lightweight framework out there similar to Flex, but
I'm not sure if this is possible, but is there a way to safely
Is there a way to debug <jsp:include> tag? I have a container.jsp that jsp:include
Question Is there an alternative (free) tool for profiling flex applications that will show
Is there any alternative to Axis2? Or the way to make it work (different
Is there an alternative in OpenSSL to SSL_set_connect_state()/SSL_set_accept_state() for X.509 certificate based authentication? The
Is there any alternative to this: Organizations.Include(Assets).Where(o => o.Id == id).Single() I would like
Are there any alternative to xlrd, xlwt and xlutils for handling MS Excel in
Is there any alternative to use like tag to property of UIView? The thing

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.