Menu

Dev C++ and C++11

Debugging
2014-03-22
2014-07-06
  • Tim Monteiro

    Tim Monteiro - 2014-03-22

    I've seen this problem thrown around on multiple forums, but never with a clear/relevant answer. I'm attempting to use some c++11 functions (namely, stoi(string s)), but am always greeted by the compiler error "'stoi' is not a member of 'std'" or "'stoi' was not declared in this scope". I've already done the obvious and included <string> in my .cpp and put -std=c++11 in the compiler parameters. Can anyone shed light on what I'm doing wrong?

     
    • FurryGuy

      FurryGuy - 2014-07-06

      Does std::stoi(string s) fail as well?

       

      Last edit: FurryGuy 2014-07-06
  • orwelldevcpp

    orwelldevcpp - 2014-03-22

    From memory, I can tell you that stoi and friends are Microsoft specific extensions of C++11. This means that when you're not using Visual C++ to compile your stuff, you will have to roll your own.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.