I am making a small vocabulary remembering program where words would would be flashed at me randomly for meanings. I want to use standard C++ library as Bjarne Stroustroup t
#include #include namespace patch { template < typename T > std::string to_string( const T& n ) { std::ostringstream stm ; stm << n ; return stm.str() ; } } #include int main() { std::cout << patch::to_string(1234) << '\n' << patch::to_string(1234.56) << '\n' ; }
do not forget to include #include
#include