Advertisement
Josif_tepe

Untitled

Mar 22nd, 2021
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <stack>
  4. #include <fstream>
  5. #include <algorithm>
  6.  
  7. using namespace std;
  8.  
  9. class Point {
  10. private:
  11.     int x;
  12.     int y;
  13. public:
  14.     Point(int x = 0, int y = 0) {
  15.         (*this).x = x; // this->x = x; isto e
  16.         (*this).y = y; // this->y = y; isto e
  17.     }
  18.     void output(int x = 10, int y = 10) {
  19.         cout << x << " " << y << endl;
  20.     }
  21. };
  22. int main()
  23. {
  24.     Point p;
  25.     p.output();
  26.      
  27.     return 0;
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement