lundi 31 août 2015

std::stoi not recognized by eclipse

On my system, running Windows 7 x64, Eclipse Luna, and g++ 4.9.2 (installed via cygwin), it seems std::stoi was never declared by g++. According to the documentation, stoi is part of the string library, so obviously I have #include <string>.

In addition, I know that stoi was introduced in C++11, and I have set the appropriate flags for my compiler (g++), even though this seems like an IDE error, rather than a compiler error.

Still, I would get one of the following error messages when building my project:

error: 'stoi' is not a member of 'std'
error: Function 'stoi' could not be resolved

How do I fix this? How do I make Eclipse recognize stoi?

Aucun commentaire:

Enregistrer un commentaire