Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!spool2.mu.edu!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.lang.c++ Subject: Re: Copy constructors Message-ID: Date: 10 Jan 91 19:35:18 GMT References: <912@elan.Elan.COM> Sender: davidm@cimshop.UUCP Distribution: comp Organization: Consilium Inc., Mountain View, California Lines: 20 In-reply-to: tom@elan.Elan.COM's message of 9 Jan 91 21:15:58 GMT X-Posting-Software: GNUS 3.12 [ NNTP-based News Reader for GNU Emacs ] >>>>> On 9 Jan 91 21:15:58 GMT, tom@elan.Elan.COM (Thomas Smith) said: Thomas> Rather than doing the cast in your above example, you might try Thomas> overloading the 'new' operator. Define a new operator for your Thomas> specific class that takes an additional pointer as a parameter. Your Thomas> 'new' operator function would then take the passed pointer and use it Thomas> in place of the usual free store. This will set up the virtual Thomas> function table for you. There are examples of this technique in most Thomas> manuals that I've seen - it is also used for implementing Thomas> class-specific memory management. Hmmm, what references are you refering to? This sounds like an interesting idea. I need to see some examples. -- ==================================================================== David Masterson Consilium, Inc. (415) 691-6311 640 Clyde Ct. uunet!cimshop!davidm Mtn. View, CA 94043 ==================================================================== "If someone thinks they know what I said, then I didn't say it!"