#include "stdafx.h"
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct MultiData
{
int a;
int b;
int c;
};
struct ICmpMuls
{
bool operator()(const MultiData& first, const MultiData& second) const
{
if(first.a< second.a)return true;
if(first.a== second.a)
if(first.b< second.b)return true;
if(first.b== second.b)
if(first.c< second.c)return true;
return false;
}
};
int main(int argc, char* argv[])
{
vector<MultiData> vec_muls;
for (int i = 0; i < 300; ++i)
vec_muls.push_back(MultiData(rand()%20, rand()));
sort(vec_muls.begin(), vec_muls.end(), ICmpMuls());
for (size_t s = 0; s < vec_muls.size(); ++s)
cout<<s<<": "<<vec_muls[s].login<<" / "<<vec_muls[s].order<<endl;
return 0;
}