2010-11-18から1日間の記事一覧

crcの計算

c++ で CRCを計算するコード.boost の crc.hpp を使います #include <iostream> #include <cassert> #include <boost/crc.hpp> using namespace std; int main() { const char *data = "hello boost/crc.hpp"; const size_t len = sizeof(data); // CRC-CCITT boost::crc_basic<16> crc1( 0x10</boost/crc.hpp></cassert></iostream>…