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).
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).
I'm an alien from another world. Planet Earth is only my vacation home, and I'm not liking it.
No it is not possible at this time to call a constructor from a constructor.
Jim
I'm an alien from another world. Planet Earth is only my vacation home, and I'm not liking it.
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