If anyone would be so kind... I do not know why I am receiving the below error. Desired output is also given.
Thank you.Code:Foobasesbase::Foobasesbase( const string& one, const string& two, const string& three ) : onedata( one ), twodata( two ), threedata( three ) { cout << "Foobasesbase constructor called." << endl; } Foobase::Foobase( const string& one, const string& two, const string& three, const string& four, const string& five, const string& six ) : Foobasesbase( one, two, three ), fourdata( four ), fivedata( five ), sixdata( six ) { cout << "Foobase constructor called." << endl; } Foo:Foo( const string& one, const string& two, const string& three, const string& four, const string& five, const string& six, const string& seven, const string& eight ) : FooBase( FooBasesBase( one, two, three ), four, five, six ), foosev( seven ), fooeig( eight ) { cout << "Foo constructor called." << endl; } // error Foobasesbase constructor called. Foobase constructor called. Foobasesbase destructor called. Foo constructor called. fourdata, fivedata, sixdata, sevendata, eightdata Foo destructor called. Foobase destructor called. Foobasesbase destructor called. // desired output Foobasesbase constructor called. Foobase constructor called. Foo constructor called. onedata, twodata, threedata fourdata, fivedata, sixdata, sevendata, eightdata Foo destructor called. Foobase destructor called. Foobasesbase destructor called.



LinkBack URL
About LinkBacks


