Newsgroups: comp.std.c++ Path: utzoo!censor!geac!alias!rae From: rae@alias.com (Reid Ellis) Subject: Re: Inheritance for enum types ??? Message-ID: <1991May26.082057.6735@alias.com> Sender: news@alias.com (0000-news(0000)) Organization: Alias Research, Inc., Toronto ON Canada References: <5701@lupine.NCD.COM> Date: Sun, 26 May 1991 08:20:57 GMT Ron Guilmette writes: |So I was thinking... this sounds like a job for ... ta da! Inheritance! | |Sure. Why not? | | enum light_color { pink, yellow, aqua }; | | enum color : light_color { red, green, blue }; A problem with this is that inheritance denotes an is-a relationship. That is, an instance of a derived object is-a base object as well. This would not be the case with the above since a 'color' can have a value that has no meaning for a 'light_color'. Good idea, though. I could use something like this -- especially for returned status codes. Reid -- Reid Ellis rae@utcs.toronto.edu || rae@alias.com CDA0610@applelink.apple.com || +1 416 362 9181 [work]