I need to determine the Checksum using the logical "XOR" of all the 32-bit words from a binary/image file.
I am fairly new to low level programming, please correct me if I am wrong:
fstream infile("file.bin", ios::in);
int checksum = 0;
int currentInt = 0;
while(infile >> currentInt)
checksum = checksum ^ currentInt;