#include using namespace std; class Point { public: int x; int y; Point(int px = 0, int py = 0) : x(px), y(py){}; }; /* class Rect : public Point, public Size { public: Rect(s16 rx = -1, s16 ry = -1, u16 rw = 0, u16 rh = 0) : Point(rx, ry), Size(rw, rh){}; Rect(const Point & pt, u16 rw, u16 rh) : Point(pt), Size(rw, rh){}; Rect(const Point & pt, const Size & sz) : Point(pt), Size(sz){}; Rect(const std::vector & vect); const Size & size(void) const{ return *this; }; bool valid(void) const{ return !(x < 0 || y < 0 || w == 0 || h == 0); }; inline Rect & operator= (const Point & pt){ x = pt.x; y = pt.y; return *this; }; inline bool operator== (const Rect & rt) const{ return (x == rt.x && y == rt.y && w == rt.w && h == rt.h); }; inline bool operator!= (const Rect & rt) const{ return !(*this == rt); }; // rect include point inline bool operator& (const Point & pt) const{ return !(pt.x < x || pt.y < y || pt.x >= (x + w) || pt.y >= (y + h)); }; // rect intersects rect inline bool operator& (const Rect & rt) const{ return (rt.x > x && rt.x < x + w || rt.x + rt.w > x && rt.x + rt.w < x + w || x > rt.x && x < rt.x + rt.w || x + w > rt.x && x + w < rt.x + rt.w) && (rt.y > y && rt.y < y + h || rt.y + rt.h > y && rt.y + rt.h < y + h || y > rt.y && y < rt.y + rt.h || y + h > rt.y && y + h < rt.y + rt.h); }; }; */ class quadrilateral { private: Point v1, v2, v3, v4; public: quadrilateral (const Point sv1, const Point sv2, const Point sv3, const Point sv4): v1(sv1), v2(sv2), v3(sv3), v4(sv4) {}; // ostream& operator<< (ostream& out); } /* ostream& quadrilateral::operator<< (ostream& out) { return out << "a = " << a << endl << "b = " << b << endl << "c = " << c << endl << "d = " << d; } */ int main(int argc, char** argv) { quadrilateral q = new quadrilateral(Point(0,0), Point(1,0), Point(1,1), Point(0,1)); cout << q; return 0; }