Please explain what does the const do right after int GetAge()? (line 13) FunctionTwo is a constant pointer to constant SimpleCat object, am I correct? (line 36)
What kind of role does the line 37 play?
13: int GetAge() const { return itsAge; }
A const class member function, tells everyone (the compiler and other users of your classs)
that that function does NOT modify any class member variables (either directly or indirectly).
Actually this is a function declaration split over two lines.
When put on the same line it looks like this: const SimpleCat * const FunctionTwo (const SimpleCat * const theCat);
It is a prototype for a function taking a parameter of a constant pointer to a constant SimpleCat and returning a constant pointer to a constant SimpleCat
A const class member function, tells everyone (the compiler and other users of your classs)
that that function does NOT modify any class member variables (either directly or indirectly).