I searched the internet for a method of doing this, and came across this neat little trick:
And I'm a little stuck here on understanding the concept of this. Is the 0xdeadbeef suppose to act as a null/garbage value?Code:typedef void func(void); func* f = (func*)0xdeadbeef; f();
Also, can
just be written as:Code:func* f = (func*)0xdeadbeef;
Also, what's the point of (func*)?Code:func *f = (func*)0xdeadbeef;
Sorry for the rather newbie question, however I can't quite understand what's happening here. Thanks for the help!



1Likes
LinkBack URL
About LinkBacks


