See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard, too.
- Linus Torvalds
#include <sstream>
#include <string>
template <class out_type, class in_value>
out_type convert(const in_value& t)
{
std::stringstream stream;
stream << t;
out_type result;
stream >> result;
return result;
}