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