Hello everybody,
Can anybody explain to me what does the following example mean. Or any of you can show me the reference to explain it?
#define MESSAGE(MID,Respn) (MID = *((unsigned int *)Respn))
Thanx.
Printable View
Hello everybody,
Can anybody explain to me what does the following example mean. Or any of you can show me the reference to explain it?
#define MESSAGE(MID,Respn) (MID = *((unsigned int *)Respn))
Thanx.
That would take two variables and cast respn to an unsigned int pointer and assign the value stored at that address to MID.
Not a great example but it should work.Code:unsigned int x = 10;
unsigned int y = 0;
MESSAGE(x, &y);
printf("%u", x);