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.
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);
Woop?
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler