Boost logo

Boost Users :

From: Vladimir Prus (yg-boost-users_at_[hidden])
Date: 2003-07-09 08:19:57


Hi Victoria,

> Example that doesn't work :
> std::cout << "Expected CRC-8 : EA" << std::endl;
> boost::crc_optimal<8, 0x9B, 0, 0, false, false> crc_8;
> crc_8 = std::for_each( data, data + data_len, crc_8 );
> std::cout << "Optimal CRC-8 : " << std::hex << crc_8() << std::endl;

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.

HTH,
Volodya


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