Referring to a base class in a derived class

From: Webster (noone_at_nowhere.net)
Date: 01/31/04


Date: Sat, 31 Jan 2004 01:01:17 GMT

Hello,

I have a class Shape and subclasses Circle, Rectangle etc. I also have a
function to write them to a file given a filepointer. However, I store the
colour info in the Shape class. My question is, is it possible to create a
WriteColour function in the Shape class, but when I call the sub class
writes (i.e. Circle.Write(...)), it will call the Shape's WriteColour
function??

Or is there a way to refer to the base class in a derived class to call it??
i.e.
base->function();

Thanks for any help!

-- 
Regards,
Webster