int main() { Counter counter; cout << "The value of val is " << counter.getItsVal() << endl; counter.increment(); cout << "The value of val is " << counter.getItsVal() << endl; return 0; }
int main() { int var = 5; Counter counter = var; cout << "The value of val is " << counter.getItsVal() << endl; return 0; }