Reply-To: "Jorge Ivan Meza Martinez" From: "Jorge Ivan Meza Martinez" To: Subject: the call of the constructor Date: Fri, 17 Jul 1998 00:45:55 -0500 Message-ID: <01bdb146$46cfea20$1c1f1bc4@default> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Precedence: bulk Hello, I have a class that has an object of another class like attribute, something like this: class miClase { public: miClase (); private: Objeto k; } the Objeto class: class Objeto { public: Objeto ( String ); } the problem is that when I am at miClase constructor I want to initalize the k object, but the compiler already called de () ( empty ) constructor, that the class Objeto hasn't. if I try in the miClase constructor something like "k = Objeto ( String ("string") )" I get many errors from Ios and others, if I try "k ( String ("string") )" it says that I cannot ( cast ) (Objeto)(miClase&). thanks for your help, jorge ivan meza martinez http://members.xoom.com/THP jimeza AT usa DOT net