int x = 5; cout<<(char)x;
the code above outputs an int x in raw binary, but only 1 byte. what I need it to do is output the x as 4-bytes in
A couple of hints.
First, to be between 0 and 2^32 - 1 you'll need an unsigned four-byte int.
Second, the four bytes starting at the address of x (&x) already have the bytes you want.
Does that help?