www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/13/21:03:06

Message-ID: <32B206A5.1E90@skygames.com>
Date: Fri, 13 Dec 1996 17:45:10 -0800
From: Kevin Baca <kbaca AT skygames DOT com>
Organization: BlueSky Software
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Calling Inherited Functions
References: <01bbe8fe$fa46c5e0$3989d2cd AT inventor DOT worldchat DOT com>

Vincent Collura wrote:
> 
> Hello,
> 
> Im still fooling around with this program and need help.  I have a base
> class and
> three other classes that inherit the base class.  My problem is that a
> function in
> the base class has to call a function in the inherited class.
> How do you do that in djgpp.
> 
> Thanks,
> 
> Vincent

This is a sign that your class may require redesign.  Maybe you should
consider putting the method in the base class instead.  If that doesn't
make sense, maybe the method should not be a class member, rather, an
old fashioned C function.

If you REALLY want to do this, make the method virtual.

-Kevin

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019