Rectangle::Rectangle(Point _pLeftUp, Point _pRightDown) : m_pLU(_pLeftUp), m_pRD(_pRightDown) { m_pLD.m_x = m_pLU.m_x; //<-- Error! if (m_pRD.m_x < m_pLU.m_x || m_pLU.m_y < m_pRD.m_y) throw std::logic_error("Invalid rectangle coordinates"); } m_pLD , m_pLU , m_pRD , m_pRU are structures at the corners of a quadrilateral. Point and Rectangle have private access specifier. Const near m_pLD , m_pLU , m_pRD and m_pRU not worth it.
const Point m_pLD, m_pLU- int3PointandRectangle. What ism_x? - AnT