Boost logo

Boost Users :

From: Jim.Hyslop (jim.hyslop_at_[hidden])
Date: 2003-07-09 08:44:11


Vladimir Prus wrote:
> I'm guessing this should be
>
> std::cout << "Optimal CRC-8 : " << std::hex << (unsigned)crc_8()
> << std::endl;
>
> The way iostreams format chars is most likely not what you wanted.
True enough - and that includes signed vs. unsigned chars (both are handled
the same, at least with my compiler).

The result needs to be put into an unsigned *int* for cout to display the
numeric value.

-- 
Jim

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net