Hey ppl,
i have a class similar to this one
Which does give me a "illegal member initialization, Foo is not a base or member". What i want to do actually, is to have the specialized constructor Foo(int a), call Foo(void) for common initializations and then have its special variable initialized.Code:class Foo { public: Foo(void) : m1(0) {}; Foo(int a) : Foo(), a(a) {}; ~Foo(void) {}; private: int m1; int a; };
How can i get this to work with initializations lists?
Best regard, threahdead



LinkBack URL
About LinkBacks



