|
class SomeClass;
typedef void (SomeClass::*SomePtr)(void);
static SomePtr ptr;
static SomeClass *pClass;
void Invoker()
{
(pClass->*ptr)();
}
class X
{
public:
void somefunc();
};
typedef void (X::*XPtr)(void);
X* pX;
XPtr Xptr;
void XInvoke()
{
(pX->*Xptr)();
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I'm an Australian physicist/software engineer living in Leipzig, Germany. I've published papers about windows (the glass kind), semiconductor device physics, environmental philosophy and theology, vacuum systems, and now (at CodeProject) the innards of C++. (Yes, my C.V. is a terrible mess.) I'm a major contributor to the
D programming language. I can read New Testament Greek, and can speak German with a dreadful accent.
I have one wife, one son (pictured), and one daughter, who are all much cuter than I am.
"The light shines in the darkness, but the darkness has not overcome it."