Advertisement
Josif_tepe

Untitled

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