Constructor Example
Class Cat
{
public:
Cat(int InitialAge); // Constructor
int GetAge(); // Accessor
void SetAge(int age); //Accessor
private:
int itsAge; // member variable
{
Previous slide
Next slide
Back to first slide
View graphic version