I\'m still learning about C++ and I\'m reading everywhere that I have to use const
everywhere I can (for speed reason I think).
I\'m usually write my getter
There is a difference between using the const
keyword for the return type or for the method signature. In the first case the returned value will be a constant value. In the second case the method will be a so-called constant method, which cannot change the representation of the object. On constant objects, only the constant methods are callable.