#include using namespace std; struct point2d { double x, y; }; ostream& operator<<(ostream& out, point2d& p) { out << "(" << p.x << "," << p.y << ")"; } int main() { point2d origin; origin.x = 0; origin.y = 0; point2d home; home.x = 37; home.y = -16.89; //double distance = origin.distanceTo(home); cout << origin << " -> " << home << "\n"; }