Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!uflorida!beach.cis.ufl.edu!sml From: sml@beach.cis.ufl.edu (Shein-Fong Law) Newsgroups: comp.lang.c++ Subject: Help needed with constructor syntax error Message-ID: <24379@uflorida.cis.ufl.EDU> Date: 10 Sep 90 08:59:49 GMT Sender: news@uflorida.cis.ufl.EDU Reply-To: sml@beach.cis.ufl.edu () Organization: UF CIS Department Lines: 39 I have compiler error when I compiled the following constructor : A::A(char* name,B* pointer):(name) // I want to pass 'name' to Base class construtor. where class A , B and Base are as follows: class B : public Base { public: B(char*); // This constructor requires char* (No default) }; class Base { public: Base(char* name=0); // if name is not supplied, default = NULL }; class A: public Base { private: char* priv_name; B* to_B; public: A(char*,B*); }; Why did my compiler (glokenspiel C++ 1.2 )give error ("syntax error") to the above constructor for A ? How can I correct the error ? Thanks in advance. Please email to me. Shein-fong Law sml@beach.cis.ufl.edu