I'm assuming that its possible to call a default constructor of a class from an argument constructor? I hope so, so I wont have to write nearly the same thing in both constructors (as my default constructor definition is kind of long). :p
I'm assuming that its possible to call a default constructor of a class from an argument constructor? I hope so, so I wont have to write nearly the same thing in both constructors (as my default constructor definition is kind of long). :p
No it is not possible at this time to call a constructor from a constructor.
Jim
You can have a member function that is called by the constructor do the initialization.
Code:class foo
{
public:
foo(){ init_foo();}
private:
init_foo() { // Do init here}
};
Jim
Patience, young one. Your feature is already planned for the next standard as we speak.