Mail Archives: djgpp/1995/01/26/07:15:42
A pure virtual function by definition cannot be called.
Presumably you are calling an overload of that function for an object
whose type is implicitly the virtual class:
ie, here the problem is obvious, but there are devious ways to do the
same thing.
class virtual_base {
    int data;
public:
    virtual void vf () = 0;
    };
void func (virtual_base *vbp)
{
    vbp->vf();                // BZZZT!
}
Maybe you can only do polymorphism for classes with the function
defined, and its derivatives.
I don't see why this should be a problem, since you can't instantiate
a pure virtual class.  But there you go; it may be necesary to
implement this way.
-- 
Stephen Turnbull  /  Yaseppochi-gumi  <turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp>
http://turnbull.sk.tsukuba.ac.jp/   anon FTP: turnbull.sk.tsukuba.ac.jp
Check out Kansai-WWW, too ---------> http://pclsp2.kuicr.kyoto-u.ac.jp/
- Raw text -