So I know the error "identifier "Convert" is undefined" probably has something to do with the way i am calling it, but i cannot figure out how to fix it.
The function convert converts the distance to the acceptable format after adding up the two objects.
Convert and Add are defined as follows in the header file:
This is the Add function defined, and with the function call for Convert
1 2 3 4 5 6 7 8 9 10 11 12 13
Distance operator+ (const Distance& d1, const Distance& d2)
{
Distance add;
add.miles = d1.miles + d2.miles;
add.yards = d1.yards + d2.yards;
add.feet = d1.feet + d2.feet;
add.inches = d1.inches + d2.inches;
Convert(add.inches, add); //i know i need to figure out the correct way to convert the added amount but i am not there yet
return add;
}