C++ stl map insert function giving error

hello there i am running my code in which stl map insert function is used but on compiling it is showing error .while when compiling on ideone it is succesfully running what to do?

Without being able to see the error, people on the Internet aren’t going to be able to help you. You should post a screenshot of what you’re talking about.

now see map insert function isn’t working ,but the same code is accepted on other platforms…

What happens if you run the program using gcc through the Terminal? Whether or not other platforms work doesn’t really help us, because they might be using other compilers.

It looks like a C++ error and I expect that you will require someone who knows a lot about C++ to solve it, especially if it’s an issue with the compiler.

got to know about it on stackoverflow the problem is atom is not configured to c++11 standards or above this syntax is valid if used in c++11 standards or above
now my question is how to configure for c++11 standards or above??

Correct, Atom is not configured for anything. Atom can’t be configured for anything, since Atom has no ability to run code and no knowledge of compilers. The package you’re using might be able to be configured so that it tells Atom the right message to send to your compiler. If you tell me which package that is, I can take a look to see if I see any settings that look appropriate. You should also answer the question I asked in my previous post.

I TRIED TO RUN USING G++ IT GIVES ERROR BUT WHEN I WRITE THIS LINE alias g++=‘g++ -std=c++11’ it works that means it is not working on c++11 standards till it is specified to the compiler how to make atom run it in feault c++11 standards?

and how to check the package please help i cannot use c++11 syntax

If you tell me the package name, I can look at it.

and how to check the package

If you’ve forgotten which one you installed, you can find out by opening Settings, and clicking on the Packages tab. One of those will be a package designed to run code. If there are more than one, you’ll need to figure out which one you’ve been using, which you can probably do by looking at keybindings.

i Am using https://atom.io/packages/gpp-compiler

there is one more https://atom.io/packages/gcc-make-run but i disabled this one to check which one i was using in this default is set to g++ there is an options to change flags and all. i hope from there on we can make it default to c++11 isn’t it??

1 Like

hey thanks a lot u gave me the hint how to change package setting i have changed the flag to -std=c++11 it worked …now c++11 codes are working …
want to ask one last think can i set it to clang compiler as it gets updated whenever there is xcode update is it so…??

1 Like

only this package allows me to change the flag so now i am using this package gcc-make-run

1 Like