Home
Manage Your Code
Snippet: Generic way to convert any type to string (C++)
Title: Generic way to convert any type to string Language: C++
Description: Generic wat to convert any type to a string Views: 156
Author: Rikesh Kisnah Date Added: 1/30/2012
Copy Code  
1template <class T>
2inline std::string to_string (const T& t)
3{
4	std::stringstream ss;
5	ss << t;
6	return ss.str();
7}
Notes
http://www.daniweb.com/software-development/cpp/threads/116344