Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct Wspolrzedne
- {
- int x;
- int y;
- };
- ostream& operator<<(ostream& out, const Wspolrzedne& xy)
- {
- out << '(' << xy.x << ',' << xy.y << ')';
- return out;
- }
- int main()
- {
- Wspolrzedne xy;
- xy.x = 2;
- xy.y = 3;
- cout << xy << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment