#include #include using namespace std; class Punkt{ private: int x, y; public: Punkt(int x, int y){ this->x = x; this->y = y; } friend ostream& operator<<(ostream& oo, Punkt& pp); friend istream& operator>>(istream& oo, Punkt& pp); }; ostream& operator<<(ostream& oo, Punkt& pp){ oo << "{" << pp.x << ", " << pp.y << "}\n"; return oo; } istream& operator>>(istream& oo, Punkt& pp){ oo >> pp.x; oo >> pp.y; return oo; } int main(){ Punkt p(1,2); cin >> p; cout << p; return 0; }