Hi,
I try to set a function pointer to a pure virtual functions in the base
class itself.
To shorten, assume the following code
class base {
public:
base() { base::Fptr = &base::F;}
void (*Fptr) (int);
virtual void F(int) = 0;
};
compiling it gives me
[~]$ g++ -c virtualptr.cpp
virtualptr.cpp: In constructor ‘base::base()’:
virtualptr.cpp:3: error: cannot convert ‘void (base::*)(int)’ to ‘void
(*)(int)’ in assignment
Where am I going wrong, and more important.
Is it actually possible?