Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class Point3D
  6. {
  7. private:
  8. int x, y, z;
  9. public:
  10. void print()
  11. {
  12. cout << "X: " << x << " Y: " << y << " Z: " << z << endl;
  13.  
  14. }
  15.  
  16.  
  17. };
  18.  
  19. class Point2D
  20. {
  21. private:
  22. int x, y;
  23. public:
  24. void print()
  25. {
  26. cout << "X: " << x << " Y: " << y << endl;
  27. }
  28.  
  29.  
  30.  
  31. };
  32. int main()
  33. {
  34.  
  35.  
  36.  
  37. system("PAUSE");
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement