How do I convert int to std::string in C++ with MinGW? -
this question has answer here:
it known issue std::to_string not work. std::itoa didn't work me. can convert int string? don't care performance, need work without being slow.
edit: have latest mingw 32 installed, std::to_string still not work. installed here: http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/32-bit/threads-win32/sjlj/
have considered using stringstream?
#include <sstream> std::string itos(int i){ std::stringstream ss; ss<<i; return ss.str(); }
Comments
Post a Comment