for example:
class Cat
{
public:
int itsAge;
int itsWeight;
};
Cat Frisky;
Frisky.itsAge = 10;
Frisky.itsWeight = 100;
Cat Billie;
Billie.itsAge = 2;
Billie.itsWeight = 50;
This is used as you can see to help make it shorter to have all this code instead of writing out all the ints for each 'Cat'.
No comments:
Post a Comment