c++ - Invalid Arguements/to_string not a member of std/function to_string could not be resolved -
so im working 9 mens morris c++ implementation eclipse , im running 3 different errors in 1 line. error resides on line
interface::broadcast("player " + std::to_string(turn + 1) + " made mill! ");
this full statement, same error resides on below line figured if can figure 1 out can figure other out.
if (result && p.getplaystate() != playerstate::state::remove) { if (millcheck::check(board, a)) { interface::broadcast(std::string("player") + std::to_string(turn + 1) + " made mill! "); std::cout << "player " << turn + 1 << " made mill! " << std::endl; p.setstate(playerstate::state::remove); } }
and giving me 3 different errors. 1 on "interface::broadcast" saying " invalid arguments ' candidates are: void broadcast(std::basic_string,std::allocator>)"
and 2 on std::to_string both says "to_string not member of std" , function 'to_string' not resolved.
my broadcast class resides in interface class following
void interface::broadcast(std::string e) { event = e;}
the error on game class , include interface class. discovery settings on cdt gcc built-in compiler settings is
${command} ${flags} -e -p -v -dd -std=c++11 "${inputs}"
i using sdl , sdl.ttf believe not cause error.
Comments
Post a Comment