Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!rjf001!hpftc!zardoz!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!ucla-cs!usc!ginosko!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!att!dptg!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c++ Subject: Re: use of new Message-ID: <9788@alice.UUCP> Date: 17 Aug 89 16:30:20 GMT References: <2276@cadillac.CAD.MCC.COM> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 17 In article <2276@cadillac.CAD.MCC.COM>, vaughan@puma.cad.mcc.com (Paul Vaughan) writes: > Why is a complete class definition required for the use of the > new operator? Example: > class foo; > > void bar() { > new foo; > } If the compiler hasn't seen the class definition for foo, it doesn't know if `new foo' is legal. The foo class might not have an empty constructor defined... -- --Andrew Koenig ark@europa.att.com