Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uxc.cso.uiuc.edu!iuvax!purdue!tut.cis.ohio-state.edu!att!cbnewsl!dog From: dog@cbnewsl.ATT.COM (edward.n.schiebel) Newsgroups: comp.lang.c++ Subject: Re: Objectifying incoming messages? Message-ID: <1295@cbnewsl.ATT.COM> Date: 29 Jul 89 14:51:19 GMT References: <448@cimshop.UUCP> Organization: AT&T Bell Laboratories Lines: 11 > ... By the way, would the object/function that reads from the > external entity be a separate thing or should it be a base class that looks at > itself and casts to the appropriate derived class (can that even be done?!?)? As a base class, I don't think so This base class doesn't have enough memory allocated to hold derived classes. You need an object that knows about all class types it may see, read the header, then create one on the free store so it may read itself. Ed Schiebel AT&T Bell Labs att!vilya!dog