error: 'stoi' is not a member of 'std'
Unsolved
General and Desktop
-
I'm trying to use a class I wrote and tested as plain c++ program in a Qt app but I'm running through problems. I was able to fix one but don't seem to find the solution to the other problem.
return std::stoi(recordCount);
the above line is producing error: 'stoi' is not a member of 'std'
recordCount is a string defined as
std::string recordCount;
By the way, I compiled and ran the plain c++ program using Qt Creator successfully.
-
hi
hmm, it should be ?
http://www.cplusplus.com/reference/string/stoi/
maybe try the Example ? -
std::stoi() is c++11
CONFIG += c++11 ?
-
std::stoi() is c++11
CONFIG += c++11 ?
@sandy.martel23
good catch!
if using mingw compiler u need to add
CONFIG += c++11 to
your pro file as c++11 support is not enabled pr default for this compiler.