I am getting the errors , add.miles, add.yards, add.feet, and add.inches in the '+' operator overload, but I do not understand why i am getting this error on this function and not on the '-' operator overload function. These are the two functions. any advice?
I guess I should also ask what error is the compiler throwing at you? It might be an issue of an infinite loop in the Convert function. Maybe you also need to modify your function call like such: add.Convert(0, add);, so the exact error would probably clear that up.
'miles' is a private member of Distance
'yards' is a private member of Distance
'feet' is a private member of Distance
'inches' is a private member of Distance
Odd how one works and the other doesn't. The only thing I could point to is that you're using operator overloads that take two parameters which means it's defined outside the scope of the class. You probably have the operator- overload a friend of the class but not the operator+.