//: C06:stringConv.h // Chuck Allison's string converter #ifndef STRINGCONV_H #define STRINGCONV_H #include #include template T fromString(const std::string& s) { std::istringstream is(s); T t; is >> t; return t; } template std::string toString(const T& t) { std::ostringstream s; s << t; return s.str(); } #endif // STRINGCONV_H ///:~