B
bg_ie
Hi,
I have an array as follows -
char arr[100];
Now I wish to copy the following int -
int tmp = 0x01020304;
into this array, at element[12].
This following would have the same result -
ThePacket3[12] = 1;
ThePacket3[13] = 2;
ThePacket3[14] = 3;
ThePacket3[15] = 4;
How can I do this without breaking up my int into 4 bytes and assigning
each element one by one?
Thanks,
Barry.
I have an array as follows -
char arr[100];
Now I wish to copy the following int -
int tmp = 0x01020304;
into this array, at element[12].
This following would have the same result -
ThePacket3[12] = 1;
ThePacket3[13] = 2;
ThePacket3[14] = 3;
ThePacket3[15] = 4;
How can I do this without breaking up my int into 4 bytes and assigning
each element one by one?
Thanks,
Barry.