Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!apple!netcom!aed From: aed@netcom.UUCP (Andrew Davidson) Newsgroups: comp.lang.c++ Subject: Re: Distinguishing stack and heap objects Message-ID: <20083@netcom.UUCP> Date: 5 Jan 91 21:07:43 GMT References: <1990Dec29.013620.23761@sjsumcs.sjsu.edu! <1598@inews.intel.com> Organization: Netcom- The Bay Area's Public Access Unix System {408 241-9760 guest} Lines: 26 It is possible to overload the new and delete operators. "A class memeber instance of opterator new must specify a retutn tupe of woid* and take a first argument of the system tupedf size_t, defined in the stddef.h system header file. this argument is automaticlally initalized by the compiler with the size of the class type in bytes." Stanley Lippman "C++ Primer" "the delete operator must have a first argument of thpe void*. A second argumment of the predefined system typedef size_t may be specified (rember to includee stddef.h) If present it is initialized implicityly wiht the sze in bytes of the object addressed by the first argument. the delete operator must have a return type of void." Stanley Lippman "C++ Primer" pages 262 - 266 andy -- ----------------------------------------------------------------- "bede-bede-bede Thats all Folks" Porky Pig Andy Davidson Woodside CA. aed@netcom -----------------------------------------------------------------