Maximal Coordinate

Hello everybody. I'm trying to write program with vectors and iterators. Coordinates X and Y are entered from keyboard (as structure) and placed in vector of points. It's necessary to display coordinates with maximal X and Y. This code was compiled but not display maximal X. What should I change?