Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <boost/crc.hpp>
- #include <boost/lexical_cast.hpp>
- #include <string>
- #include <iostream>
- #include <algorithm>
- int main()
- {
- int licznik = 0;
- int suma = 0;
- for ( licznik = 0; licznik <= 255; licznik++ )
- {
- suma = suma + licznik ;
- std::cout << "Wyraz: " << licznik << " --> Suma: " << suma << std::endl;
- }
- std::string str = boost::lexical_cast<std::string>(suma);
- boost::crc_32_type crc32;
- crc32 = std::for_each(str.begin(), str.end(), crc32);
- std::cout << "CRC32: " << crc32() << std::endl;
- system( "PAUSE" );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement