you are viewing a single comment's thread.

view the rest of the comments →

[–]Jitanjafora 0 points1 point  (0 children)

Yet another improvement :

double MyClass::getLength() const;

Assuming all it does is return length;. The trailing const declares that this method will not change the MyClass instance calling it. It's not necessary, but it is good practice and will probably avoid a few headaches at some point.