fork download
  1. #include <iostream>
  2.  
  3. class Point2D
  4. {
  5.  
  6. protected:
  7. int x;
  8. int y;
  9.  
  10. public:
  11. //Constructor
  12. Point2D();
  13. Point2D (int x, int y);
  14.  
  15. //Accessors
  16. int getX() const {return x; }
  17. int getY() const {return y;}
  18.  
  19. //Mutators
  20. void setX (int x);
  21. void setY (int y);
  22.  
  23. static bool sortPoint2DXAsc(const Point2D& left, const Point2D& right)
  24. {
  25. return (left.x < right.x) || ((left.x == right.x) && (left.y < right.y));
  26. }
  27.  
  28. };
  29.  
  30. int main() {
  31.  
  32. return 0;
  33. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty