Quote Originally Posted by Nikosant03
I cannot understand this line inside the class: Distance addDist( Distance d2 );

It creates an object "addDist" passing as parameter an other object "d2"?
No, it declares that the class named Distance has a member function named addDist that has a Distance parameter and a return type of Distance.

Quote Originally Posted by Nikosant03
Also I don't understand the syntax of this line: Distance Distance:: addDist( Distance d2 )
That is the start of the definition (implementation) of the addDist member function of the Distance class.