Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) std::to_string

 

std::to_string is a C++11 STL function to convert a bool, double or integer to std::string.

 

#include <string>
//From http://www.richelbilderbeek.nl/CppDoubleToStr.htm
const std::string DoubleToStr(const double x)
{
  return std::to_string(x);
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

This page has been created by the tool CodeToHtml