Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!caen!sol.ctr.columbia.edu!emory!gatech!prism!gt5595c From: gt5595c@prism.gatech.EDU (BARTZ) Newsgroups: comp.lang.c++ Subject: Derived/Base Class constructor relationship Message-ID: <29534@hydra.gatech.EDU> Date: 21 May 91 18:34:01 GMT Distribution: na Organization: Georgia Institute of Technology Lines: 47 I have a question about derived class constructors. Below is the skeleton of the problem. class A { A(int f1,int f2,double first ...); // Constructor of base class ... }; class B : public A { B(int g1,double first ...) : Matrix(g1,g1,first) {}; // Constructor for derived class ... }; The constructor for the base class works OK with the ellipse but the derived class construction does not work. The base class constructor is not called with the list of doubles. The cfront output for this declaration B X(1,3,0.1,0.3,0.2); looks something like this: struct B __1X ; ( (__ct__6ClassA_FiT1d3 ( ((struct A *)(& __1X )), 1 , 3 , 0.1 ) ), (((& __1X )))) ; instead of __ct__6ClassA_FiT1d3 ( ((struct A *)(& __1X )), 1 , 3 , 0.1 , 0.3, 0.2); Is it not legal to pass variable length arguments through to base class constructors? ----------------------------------------------------------------------- Michael Bartz Coding and Information Theory Laboratory Georgia Institute of Technology School of Electrical Engineering, Atlanta, GA 30332-0250 E-MAIL: gt5595c@prism.gatech.edu PHONE: (404) 853-9362