home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!mundil.cs.mu.OZ.AU!fjh
- From: fjh@mundil.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: Downcasting (was: Re: run-time type checking)
- Message-ID: <9222807.17387@mulga.cs.mu.OZ.AU>
- Keywords: polymorphism, RTTI, downcasts.
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <1992Aug8.152913.20167@mole-end.matawan.nj.us> <1992Aug9.221309.15259@ucc.su.OZ.AU> <9222518.29381@mulga.cs.mu.OZ.AU> <1992Aug12.211716.7975@Warren.MENTORG.COM>
- Date: Fri, 14 Aug 1992 21:52:24 GMT
- Lines: 16
-
- adk@Warren.MENTORG.COM (Ajay Kamdar) writes:
- >Making the Derived?* functions pure virtuals in the base class also
- >forces each derived class to know about its sibling classes. No good.
-
- Yes, that would certainly be a bad idea; I think it was a typo in maxtal's
- original post.
- ie.
- virtual Derived *() = 0;
- should have been
- virtual Derived *() { return 0; }
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature VIRUS is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-