All pastes #1619823 Raw Edit

scanner.hpp

public cpp v1 · immutable
#1619823 ·published 2009-10-14 16:23 UTC
rendered paste body
#include <iostream>#include <cstdlib>#include <limits>namespace ralph{		class scanner{		std::istream &in;			public:		explicit scanner(std::istream &in)		:in(in){		}				template <typename T>		T read(){			T data;			in>>data;			return data;		}		template<>		std::string read<std::string>(){			std::string str;			std::getline(in, str);			return str;		}	};};