#include <iomanip>
#include <string>
#include <sstream>
+#include <istream>
+#include <ostream>
#include <cassert>
#ifdef _WIN32
return os;
}
+template < typename N, typename E >
+std::istream& operator>> (std::istream& is, number< N, E >& n)
+{
+ std::string str;
+ is >> str;
+ unsigned base = 10;
+ if (is.flags() & std::ios_base::hex) // Si lo piden en hexa
+ base = 16;
+ if (is.flags() & std::ios_base::oct) // Si lo piden en octal
+ base = 8;
+ n = number< N, E >(str, base);
+ return is;
+}
+
template < typename N, typename E >
std::string numberToHex(const number< N, E >& n)
{