jeudi 4 juin 2015

Invalid Arguements/to_string not a member of std/function to_string could not be resolved

So Im working a Nine Mens Morris C++ implementation with eclipse and im running into three different errors in one line. The error resides on this line

Interface::broadcast("Player " + std::to_string(turn + 1) + " made a mill! ");

And it is giving me three different errors. one on the "Interface::broadcast" saying that "Description Resource Path Location Type Invalid arguments ' Candidates are: void broadcast(std::basic_string,std::allocator>)"

and two on the std::to_string which both says that "to_string is not a member of std" and that the function 'to_string' could not be resolved.

My broadcast class resides in my interface class which is the following

void Interface::broadcast(std::string e) {
event = e;}

The error is on my game class and it does include the interface class. My discovery settings on the CDT GCC Built-in Compiler Settings is

${COMMAND} ${FLAGS} -E -P -v -dD -std=c++11 "${INPUTS}"

I am using SDL and SDL.ttf but I believe that it does not cause the error.

Any help in resolving this error is highly appreciated.

Aucun commentaire:

Enregistrer un commentaire