Overloaded Constructors
// Constructor that takes no args initializes counter to 0
counter() { counter_p = 0; }
// Constructor that takes an argument initializes to
counter(int initial_value) { counter_p = initial_value; }
void increment() { counter_p++; }
void decrement() { counter_p--; }
void get_value() { return counter_p; }
counter a; // Now this is legal!
counter c(“Hi”); // ILLEGAL - Expecting int, got char *
counter d(4, 5); // ILLEGAL - Expecting one int, got two ints