Path: utzoo!utgpu!watmath!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