If you're going to find one to include, it's probably part of another dependency. So your best bet is to try to write your own. Now is a good time to practice making a template class. :)
template <typename T>
struct point
{
// or maybe you'd prefer to make these private
T x;
T y;
};
template <typename T>
struct rectangle
{
public:
typedef point<T> point_type;
bool contains(const point_type& pPoint)
{
return !(pPoint.x < topleft.x) && (pPoint.x < bottomright.x) &&
!(pPoint.y < topleft.y) && (pPoint.y < bottomright.y);
}
T width(void) const
{
return bottomright.x - topleft.x;
}
// and more stuff
// or maybe you'd prefer to make these private, nor
// is this the only way to represent a rectangle.
point_type topleft;
point_type bottomright;
};
Sorry it's not the answer you're expecting.
Just about your design, I hope you're not taking your GUI version, performing a copy, then modifying it into a console version. Better would be to make a library; then GUI versus console is merely a matter of presentation.