#include <iostream>
using namespace std;
class Counter {
public:
int count;
void incBy(int value) {
count += value;
}
void incBy(int value, int amount) {
count += value * amount;
}
};
Counter *counter = new Counter;
counter->incBy(1);
//counter.count is 1
counter->incBy(2, 5);
//counter.count is 11
cout << "count is " << counter->count;
delete counter;