Hi..
I have a int variable like this:
int IntVal = 0xff0102fa;
and I wnat to change it on 4 short like this:
short S1,S2,S3,S4;
S1 = 0xffff;
S2 = 0x0001;
S3 = 0x0002;
S4 = 0xfffa;
I don't like this solution:
int IntVal = 0xff0102fa;
char *CharPtr;
CharPtr = (char *)(&IntVal );
S1 = CharPtr[0] ; etc
any suggestion?
thanks
PF