I have an int which is 4 bytes long
I want to now get the 4 individual bytes and add them together as if they were 1 byte ints or something...overflows get neglected
so if I had
0x1AD4270F as an integer, I would want it to be
1A + D4 + 27 + 0F (but just chopping off any overflow)
can I take a pointer to a char, set it equal to the address of the integer, and just read all 4 bytes?
I want to now get the 4 individual bytes and add them together as if they were 1 byte ints or something...overflows get neglected
so if I had
0x1AD4270F as an integer, I would want it to be
1A + D4 + 27 + 0F (but just chopping off any overflow)
can I take a pointer to a char, set it equal to the address of the integer, and just read all 4 bytes?