// ...
base( int t ) : i(t) {} // initialize member i with t
// ...
vijayan121
Posting Virtuoso
1,606 posts since Dec 2006
Reputation Points: 1,159
Solved Threads: 287
you can call functions inside the body of the constructor. colon initialization can be used only for initialization of members or base classes (using copy constructor semantics).
vijayan121
Posting Virtuoso
1,606 posts since Dec 2006
Reputation Points: 1,159
Solved Threads: 287