Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!uwmcsd1!uxc!tank!nucsrl!morrison
From: morrison@eecs.nwu.edu (Vance Morrison)
Newsgroups: comp.lang.c++
Subject: Re: Overload virtual functions?
Message-ID: <8180018@eecs.nwu.edu>
Date: 20 Sep 88 22:31:39 GMT
References: <1215@tuhold>
Organization: Northwestern U, Evanston IL, USA
Lines: 31


Hello,

It seems your problem is that you want to overload a virtual function in
the base class, but not define all the overloaded function in the
derived class.  

A quick solution to your problem would be to define the overloaded function
in the derived class explicitly.  

class base {
..
public:  
	virtual void f1();
	virtual void f1(int);
};

class derived: public base {
..
public:
	void f1();
	void f1(int i)	{ base::f1(int i); };
}

Note that if this is not the behavior that you want, you should
probably rethink why exactly you want to do this.  Essentially 
overloading is ONLY for notational convience, if you are trying
to use it for something else, you are probably trying to make
it do too much.

Vance Morrison
Northwestern Univ.