} 14: void SetAge(int age) { *itsAge

}
14: void SetAge(int age) { *itsAge = age; }
15: CAT & operator=(const CAT &);
16:
17: private:
18: int *itsAge;
19: int *itsWeight;
20: };
21:
22: CAT::CAT()
23: {
24: itsAge = new int;
25: itsWeight = new int;
26: *itsAge = 5;
27: *itsWeight = 9;
28: }
29:
30:
31: CAT & CAT::operator=(const CAT & rhs)
32: {
33: if (this == &rhs)
34: return *this;
35: *itsAge = rhs.GetAge();
36: *itsWeight =

Random Posts




You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply