MeehoweCK

Untitled

Apr 8th, 2023
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct Wspolrzedne
  6. {
  7.     int x;
  8.     int y;
  9. };
  10.  
  11. ostream& operator<<(ostream& out, const Wspolrzedne& xy)
  12. {
  13.     out << '(' << xy.x << ',' << xy.y << ')';
  14.     return out;
  15. }
  16.  
  17. int main()
  18. {
  19.     Wspolrzedne xy;
  20.     xy.x = 2;
  21.     xy.y = 3;
  22.     cout << xy << endl;
  23.  
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment