Hi guys I'm trying to calculate the checksum of a struct that I've made. I created a struct packet that contains multiple char and int variables. Is there a way to calculate the checksum of such a struct?
My first guess was, calculating the packet size and then use a cycle to calculate for each position its value, sum those together and then return that value.
The problem is that I don't know how to calculate each position of this packet, since there are multiple type of variable cause it's a struct.
Do you have any suggestion?
"Big Dog"
string field will be equal to a"Dig Bog"
field if you use a strictly accumulative summation. – Mark Benningfield