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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:04:46+00:00 2026-05-23T07:04:46+00:00

I am looking for a template for hash map that i can rely on,

  • 0

I am looking for a template for hash map that i can rely on, and use whenever i need hash table. I was trying to use hash_map but found out that it is deprecated now.Tried using unordered_map, but i get the following error-

error: #error This file requires compiler and library support for the upcoming ISO C++ s        tandard, C++0x. This support is currently experimental, and must be enabled with the -s    td=c++0x or -std=gnu++0x compiler options.

Now, i am completely confused. I have been using hashmap in java, and it was pleasantly straight forward. It is not so in c++.
Guide me on what to use and how to use a hash table in c++.

  • 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-05-23T07:04:47+00:00Added an answer on May 23, 2026 at 7:04 am

    hash_map (or rather, unordered_map, as it was called to avoid name collisions) is in the latest version of C++ (c++0x, or c++11) but many compilers, including yours, supported it before that. Your compiler is just being nice and stopping you from writing potentially non-portable code without your explicit consent.

    As the others say, adding -std=c++0x to your compiler options will allow you to use hash_map,

    Do be aware that compiling that code somewhere else will require a rather modern c++ compiler.
    (That might not be an issue for you.. if you’re just learning by yourself or not sharing the code outside your office, you should be fine…)

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

Sidebar

Related Questions

I am looking for template/generator libraries for C++ that are similar to eg. Ruby's
I am looking for a template engine to use client side. I have been
I am looking for a good template system (preferably XML-based) that provides implementations both
I'm looking for a Django template filter that turns a multi-line construction into one
I'm looking for some background on this template (need a citation for a report).
I am looking to create a variable that is a template for repatative elements
I am looking at using a custom template for a set of categories. Is
I'm looking for a quick start or template, or something, to get a web
I am looking for a CSS-based web page template where the main content div
Looking for an example that: Launches an EXE Waits for the EXE to finish.

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.