C++ Code Snippets

This page contains snippets of code that you could use to program your dedicated C++ compiler with. Note that in all these examples, the entire file is stored in a vector, with each byte represented as an unsigned char, named "file".

File Checksum
This function returns a 16-bit checksum. unsigned short int checksum = 0; for(int i=0; i> 1) | (checksum << 15); }