virtual operators
Michael Hoennig
Michael_Hoennig at hh.maus.de
Wed Jun 5 05:23:00 AEST 1991
Hi Bernhard,
BD> virtual int operator< (Base &) const; // less than operator for
Ba
BD> virtual int operator< (const TestInt &) const; // overide Base
this aren't the same methods because the parameter listes differ.
If calls refer to a Base* (as in your example), always the method
"virtual int opertor< (Base&) const" will be called, never the other
one, because its paramters doesn't match.
You see?
Adios
--
Michael Hoennig -- Dobbelersweg 45 -- D-2000 Hamburg 26 -- ++49 40 219 24 58
office: mi1 at starlab.UUCP -- ++49 40 23 08 56 (StarDivision Hamburg)
More information about the Comp.lang.c
mailing list