(C++) std::to\_string

January 11, 2018 · View on GitHub

 

 

 

 

 

(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); }