#include "stdafx.h"
#include <vector>
#include <Windows.h>
#include <iostream>
#include <algorithm>
using namespace std;
struct Test
{
int A;
Test(int a)
{
A = a;
}
};
bool compare( Test a, Test b )
{
return a.A > b.A;
}
int _tmain(int argc, _TCHAR* argv[])
{
vector<Test> T1;
Test test = Test(1);
T1.push_back( test );
Test test2 = Test(2);
T1.push_back( test2 );
sort( T1.begin(), T1.end(),compare );
system("pause");
return 0;
}