10 20 30 40 50 60 70 80 90 100

50 40 30 20 10 60 70 80 90 100
10 20 30 40 50 60 70 80 90 100
#include <iostream>
#include <vector>
#include <algorithm>

struct Point
{
	Point(int x, int y) : x(x), y(y) { }
	
	void Print()
	{
		std::cout << x << ", " << y << std::endl;
	}

	int x;
	int y;
};

int main()
{
	std::vector<Point> points({ Point(1,1), Point(2,2), Point(3,3), Point(4,4), Point(5,5) });

	// std::for_each를 사용해 모든 원소의 x, y에 10씩 증가시킨다.

	// 결과 출력.
	for (auto& point : points)
	{
		point.Print();
	}

	std::cin.get();
}