Okay this whole code that I'm about to list is about using postfix and prefix operators to increment one class object to another by using the "this" pointer. The thing that I don't understand about this code is from lines: 21-23. They are trying to set up the default constructor but they put the "itsVal" outside the brackets of the constructor and they put a zero right next to it, which I'm assuming set the "itsVal" to zero. But why I don't get is how are they allowed to set the private member to zero, by just putting a value right next to it in parenthesis? Another question I need to know is through lines:31-35. On line 33, what is it actually saying? I know an object of the class is being declared and their adding the "this" pointer in the parameters, but is the
this
pointer pointing to the memory address of the constructor? Any help would be grateful
for your first question read up on initialiser lists, for the second question - this points to the object that the member function is being called for. Line 33 is just constructing a Counter object using the copy constructor with the object pointed to by this as a parameter