Is there an easy way or function to convert a long into a string like in C with itoa i mean even though that doesnt do it compeltely is there a simple way?
This is a discussion on convert long to string within the C++ Programming forums, part of the General Programming Boards category; Is there an easy way or function to convert a long into a string like in C with itoa i ...
Is there an easy way or function to convert a long into a string like in C with itoa i mean even though that doesnt do it compeltely is there a simple way?
You could use std::stringstream object and << >> operators.
Also, about itoa():Originally Posted by http://www.cplusplus.com/reference/clibrary/cstdlib/itoa/
If you want people to help you, try to provide Short, Self Contained, Correct (Compilable), Example
[ C++ FAQ Lite | Stroustrup's FAQ | C++ interview questions | Boost | Nuwen's MinGW | Valgrind | JTC1/SC22/WG21 | GDB tutorial ]
boost::lexical_cast is another way.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^