class my
{
public:
my(int a,int b):(first=a)(second=b){}
int first;
int second;
bool operator<(const my &m)
{return first<m.first}
}
int main()
{
my x(1,2);
std::vector<my> container;
container.push_back(x);
..........
sort(container.begin(),container.end());
}
从小到大排序