operation overloading with structures c++ code example
Example: struct c overload
struct Point
{
float x;
float y;
bool operator<(const Point& p) const
{
return (x < p.x && y < p.y);
}
};
struct Point
{
float x;
float y;
bool operator<(const Point& p) const
{
return (x < p.x && y < p.y);
}
};