2024/2/5

1:6 2

2:7 8  3 3  1 1  7 3  4 4

3:28

4:10 8

5:

Multi[0] is: 0

Multi[1] is: 1

Multi[2] is: 4

Multi[3] is: 9

Multi[4] is: 16

Multi[5] is: 25

Multi[6] is: 36

Multi[7] is: 49

Multi[8] is: 64

Multi[9] is: 81

Destroying..0

Destroying..1

Destroying..2

Destroying..3

Destroying..4

Destroying..5

Destroying..6

Destroying..7

Destroying..8

Destroying..9

6:

7:

   frisky's age:5

    Setting frisky to 6...

    Creating boots from frisky

    frisky's age:6

    boots' age:6

    Setting frisky to 7...

    frisky's age:7

    boots' age:6

添加

CAT::CAT(const CAT& other) {

    itsAge = new int;

    *itsAge = *other.itsAge;

}

CAT::~CAT() {

    delete itsAge;

    itsAge = 0;

}

你可能感兴趣的:(postman)