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

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -