#include#include "geometry.h" using namespace std; int main() { Point p1(2, 3); Point p2(5, 7); double dist = distance(p1, p2); cout << "Distance between p1 and p2 = " << dist << endl; return 0; }
#includeIn this example, the `Rectangle` class from the Geometry library is used to represent the rectangle and the `area` function is used to calculate its area. The package library for the Geometry library is likely to be named something like `libgeometry` or `geometrylib`.#include "geometry.h" using namespace std; int main() { Rectangle rect(Point(0,0), Point(3,4)); double area = rect.area(); cout << "Area of rectangle = " << area << endl; return 0; }