I want to store a 4-byte int in a char array... such that the first 4 locations of the char array are the 4 bytes of the int.
Then, I want to pull the int back out o
Not the most optimal way, but is endian safe.
int har = 0x01010101; char a[4]; a[0] = har & 0xff; a[1] = (har>>8) & 0xff; a[2] = (har>>16) & 0xff; a[3] = (har>>24) & 0xff;