Hi all,
Given this situation:
class Base
{
typedef void (Base::*FN_FOO)();
virtual void Foo() = 0; // pure virtual
void GetFoo(FN_FOO pfnFoo) = 0; // pure virtual
}
class Derived : public Base
{
void Foo(); // implemented
void GetFoo(FN_FOO pfnFoo); // implemented
}
Then, somewhere in the code:
Derived derInstance;
FN_FOO pfnFoo;
derInstance.GetFoo(pfnFoo);
GetFoo is implemented like this:
void Derived::GetFoo(FN_FOO pfnFoo)
{
pfnFoo = &derInstance::Foo;
}
I get a compiler error that says cannot convert from Derived::* to
GraphicsEngine::*, conversion requires reinterpret_cast, C-style cast
or function-style cast.
Can anyone help me with the syntax for this cast?
Thanks!
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----