Advertisement
Guest User

Untitled

a guest
May 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class Dot
  6. {
  7.  
  8. private:
  9.  
  10.  
  11. public:
  12. float x;
  13. float y;
  14.  
  15.  
  16. Dot(float X, float Y) : x(X), y(Y)
  17. {
  18. x = X;
  19. y =Y;
  20. }
  21. ~Dot()
  22. {
  23. cout << "Destructor called for Dot" << endl;
  24. }
  25.  
  26. };
  27.  
  28.  
  29.  
  30. int main(int argc, char** argv) {
  31.  
  32. Dot a(2,3);
  33.  
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement