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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:09:35+00:00 2026-05-12T21:09:35+00:00

after some years in Java and C# now I’m back to C++. Of course

  • 0

after some years in Java and C# now I’m back to C++. Of course my programming style is influenced by those languages and I tend to feel the need of a special component that I used massively: the HASH MAP. In STL there is the hash_map, that GCC says it’s deprecated and I should use unordered_map. So I turned to it. I confess I’m not sure of the portability of what I am doing as I had to use a compiler switch to turn on the feature -std=c++0x that is of the upcoming standard. Anyway I’m happy with this. As long as I can’t get it working since if I put in my class

std::unordered_map<unsigned int, baseController*> actionControllers;

and in a method:

void baseController::attachActionController(unsigned int *actionArr, int len,
        baseController *controller) {
    for (int i = 0; i < len; i++){
        actionControllers.insert(actionArr[i], controller);
    }
}

it comes out with the usual ieroglyphs saying it can’t find the insert around… hints?

  • 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-12T21:09:35+00:00Added an answer on May 12, 2026 at 9:09 pm

    Just use:

    actionControllers[ actionArr[i] ] = controller;
    

    this is the operator overloading java owe you for ages 🙂

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

Sidebar

Related Questions

After five years of professional Java (and to a lesser extent, Python) programming and
After some years of experience in the field, it seems to me that the
After becoming somewhat estranged open source, and spending some years developing web applications in
After some stupid musings about Klingon languages, that came from this post I began
I've been tasked with debugging a Java (J2SE) application which after some period of
Since uni, I've programming in Java for 3 years, although I am not fully
After some find and replace refactoring I ended up with this gem: const class
After some time I wanted to update my git repo, and then something went
I'm after some good tips for fluent interfaces in C#. I'm just learning about
I remember first learning about vectors in the STL and after some time, I

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.