Kederaji
public cpp v1 · immutableistream& operator>>(istream &s, Point &p) { int x, y; char lpar, comma, rpar; if (s >> lpar) { if ((s >> x >> comma >> y >> rpar) && (lpar == '(' && comma == ',' && rpar == ')')) p = Point(x, y); else s.setstate(ios::badbit); // read failed } return s;}//Do not, I repeat, DO NOT print anything when reading!//And try to read from s, not cin . . .