9 Jul
2003
9 Jul
'03
1:19 p.m.
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