Advertisement
Josif_tepe

Untitled

Sep 4th, 2021
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. class point {
  6. public:
  7.     int x, y;
  8.    
  9.     point() {
  10.        
  11.     }
  12.     point(int _x, int _y) {
  13.         x = _x;
  14.         y = _y;
  15.     }
  16. };
  17. int main() {
  18.     point p;
  19.     p.x = 10;
  20.     p.y = 20;
  21.     cout << p.x << " " << p.y << endl;
  22.     return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement