From 387f83cf2107ac1b576d3842c2e33f8237e1808f Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 3 Oct 2005 07:26:16 +0000 Subject: [PATCH] Muestra salida con ancho fijo de native_type. --- src/number.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/number.h b/src/number.h index 7df04e1..522fc96 100644 --- a/src/number.h +++ b/src/number.h @@ -7,6 +7,7 @@ #include #include #include +#include #include /* sizeof(E) tiene que ser 2*sizeof(N); y son los tipos nativos con los cuales @@ -217,7 +218,8 @@ std::ostream& operator<< (std::ostream& os, const number< N, E >& n) // FIXME sacar una salida bonita en ASCII =) for (typename number< N, E >::const_iterator i = n.chunk.begin(); i != n.chunk.end(); ++i) - os << std::hex << *i << " "; + os << std::setfill('0') << std::setw(sizeof(N) * 2) << std::hex + << *i << " "; return os; } -- 2.43.0