Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
IntToStr is a code snippet to convert an int to std::string. To convert a std::string to int, use StrToInt.
IntToStr has multiple versions:

IntToStr using the C++98 and the STL

IntToStr using the C++98 and the Boost library

IntToStr using the C++11 and the STL

IntToStr using the C++98 and the STL
#include <stdexcept> |
The code snippet above was modified from the C++ FAQ Lite.

IntToStr using the C++98 and the Boost library
#include <string> |

IntToStr using the C++11 and the STL
#include <string> |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.