Skip to content

Latest commit

 

History

History
38 lines (21 loc) · 1.44 KB

File metadata and controls

38 lines (21 loc) · 1.44 KB

 

 

 

 

 

 

IntToWString is a convert code snippet to convert an integer to a Wt::WString.

 


#include <sstream> #include <stdexcept> #include <string> #include <Wt/WString> ///IntToWString converts integer to Wt::WString ///From http://www.richelbilderbeek.nl/CppIntToWString.htm const Wt::WString IntToWString(const int i) {   std::ostringstream s;   if (!(s << i)) throw std::logic_error("IntToWString failed");   return Wt::WString(s.str()); }