Original Post
How would I get access to the 4 component bytes of a long int or a float? And similarly, how would I reat 4 seperate char bytes as a single unit to make a long int or a float?
For example, if I had
unsigned char *value;
short int value2;
value = malloc(sizeof(short));
//2 Bytes read into value;
How would I then stick those 2 seperate bytes into value2 to make a short int?
long int *value;
short int value2, value3, value4, value5;
value3 = malloc(sizeof(long)*2);
How would I take 4 bytes from the first long and stick them into value2 and 3, and then the other 4 bytes into 4 and 5?
value[0] and value[1] would reference 4 byte chunks so how would I do it?
------------
- outRider -
