Firstly, this code is incorrect; since C ++ is case sensitive Classand Publicare not keywords. It is also very unusual (albeit legal) to use the first letter of the parameter name ( Counter).
Assuming proper capitalization, you have an overload of a call function operator. This allows you to “call” the instance Bookas if it were a function:
Book b;
...
b(23);
source
share