#pragma hdrstop
#pragma argsused

#include <tchar.h>
#include <stdio.h>
#include <vector>
#include <iostream>
#include <algorithm>
//#include <random>


template <typename X> void sort_vector(std::vector<X>& v)
{
	sort(v.begin(), v.end(), [] (const X& a, const X& b) { return a < b; });
}

int _tmain(int argc, _TCHAR* argv[])
{
	// std::uniform_int_distribution<int> one_to_one_million {1,1000000};
	// std::default_random_engine re {};
	// auto random_int_one_to_one_million {std::bind(one_to_one_million,re)};


	std::vector<int> v;
	for(int i=0; i < 10; i++)
	{
		v.push_back(rand());

	}

	std::cout << "Unsorted List" << std::endl;
	for (auto i = v.begin(); i != v.end(); ++i)
		std::cout << *i << std::endl;

	sort_vector(v);

	std::cout << "Sorted List" << std::endl;
	for (int i : v)
		std::cout << i << std::endl;

	std::cin.get();
	return 0;
}
