Message-ID: <38AC7641.5385A627@caresystems.com.au> Date: Fri, 18 Feb 2000 08:29:21 +1000 From: leon X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: c++ References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Jean-Francois Desjardins wrote: > > Hello! > I want to know how I can initialize an object, within an object: initialise contained class (ie Panel) in the CONSTRUCTOR stage of Dekstop ie INSTEAD of writing class Desktop{ public: Panel Menu(0,0,100,100); Panel Icon(0,100,100,100); } write this: class Desktop{ public: Panel Menu; Panel Icon; } then in Desktop::Desktop() : Menu(0,0,100,100),Icon(0,100,100,100) { } have a nice day ;-)