Category : ambiguous-call

I cannot figure out why I am getting the error "reference to ‘distance’ is ambiguous". I have passed class object as an argument in friend function. #include <iostream> using namespace std; class distance { int meters = 0; public: distance() {} void displaydata() { cout << "Meters Value:" << meters; } //Prototype friend void addvalue(distance ..

Read more