#include
Class CAT {public: (CAT);
The CAT (const CAT&); ~ (CAT);
Const int GetAge () {return * itsAge; }
Void SetAge (int age) {* itsAge=age; } protected: int * itsAge; }; CAT: CAT ()
{itsAge=new int. * itsAge=5; }
CAT: CAT (const CAT& C)
{___. ___. }
CAT: : ~ (CAT) {delete itsAge; }
2. The output of the following procedure is known: 10
Please make up Sample class member functions, don't add member variable,
#include
//add code here
___}; Int main () {Sample a, (5). The Sample b=a; Cout & lt;
CodePudding user response:
1//copy constructor, give a member variable application memory and assignmentItsAge=new int. * be sad etAge chtistina georgina rossetti.british poetess itsAge=();
2//copy constructor, the member variable * 2
The Sample (const Sample & amp; A) {this - & gt; V=2 * Dr.); }