Not sure how to solve - 'stoi' was not declared in this scope

I believe it has something to do with C++11 but I'm not sure how to change the settings in CLion for it to compile.

 

3 comments
Comment actions Permalink

I added this to CMake options...

-std=c++11

But still same issue

0
Comment actions Permalink

I assume you incleded <string> header and you're using std namespace?

http://en.cppreference.com/w/cpp/string/basic_string/stol

0
Comment actions Permalink

Yeah, I'm just learning c++ and was using the first script here...

http://www.newthinktank.com/2014/11/c-programming-tutorial/

I changed stoi to the atoi equivalent but just wondering why I can't stoi / stod to work

 

0

Please sign in to leave a comment.