Hi,
i got a class:
The constructor can be:Code:class base{ private: int age; public: base(int); };
method A:
method B:Code:base::base(int _age):age(_age){ }
are both the methods correct? is it correct in c++ to use method B?Code:base::base(int _age){ age=_age; }
do clarify.
thanks