Hi there,
what is the best way to convert uint16_t variable into std::string? Could you please show this with a code example? Thank you!
Printable View
Hi there,
what is the best way to convert uint16_t variable into std::string? Could you please show this with a code example? Thank you!
Use << to "print" the integer into a stringstream. Stringstreams convert to strings using the .str() function.
worked great, thanks!
Another way:
boost::lexical_cast<std::string>(my_integer);