| Can't use C++11 features? [message #773607] |
Sun, 01 January 2012 23:37  |
Eclipse User |
|
|
|
Ahoy. I've just (on Windows 7) downloaded and installed MinGW, MSys, changed my environment path, and maybe some other stuff and got Eclipse to compile and run my projects.
I'm trying to use C++11 features, which, at a guest lecture, Bjarne Stroustrup indicated should already be available in current implementations of gcc and hence, MinGW and all that, but, I can't. If I simply attempt to #include <unordered_set>, I can compile and get my program to run by adding the compiler option 'std=c++0x', which I did successfully (though I've not actually tried using one of these containers). What troubles me though, is that I can't access the new string functions that should be implemented, things like stoi, as documented here: en.cppreference.com/w/cpp/string/basic_string/stol
I've used the precise example they list on that page to no avail. I get the error: ..\src\main.cpp:17:27: error: 'stoi' was not declared in this scope
Have I done something wrong with Eclipse, or am I wrong in the assumption that this feature should already be implemented in the compiler?
Edit:
For what it's worth, I tried compiling directly from the command line with gcc and got the same error...
Here's a question... can any of you successfully compile and run a program using stoi?
[Updated on: Mon, 02 January 2012 13:11] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06492 seconds