Teh carried by the vector is a pair indexed by an id:
<std::pair<int, std::pair<int, int>>>
496 1, 256
(message id)
As you can see, the "id" is repetitive. For further processing of this data, it will be logically very useful for me to sort that triplet on the basis of "message id". How can I do this using STL functions ?
Here is some data sample:
15:38:08.307 - (I) ET02 - For message Id: 496 Tag - value pair: 1 - 256
15:38:08.307 - (I) ET02 - For message Id: 496 Tag - value pair: 2 - 27060
15:38:08.307 - (I) ET02 - For message Id: 496 Tag - value pair: 3 - 2014-06-16T17:07:00.519
15:38:08.307 - (I) ET02 - For message Id: 487 Tag - value pair: 1 - 1044
15:38:08.307 - (I) ET02 - For message Id: 487 Tag - value pair: 2 - 9098150000
15:38:08.307 - (I) ET02 - For message Id: 498 Tag - value pair: 1 - 9098150000
15:38:08.307 - (I) ET02 - For message Id: 498 Tag - value pair: 2 - 9098150000
15:38:08.307 - (I) ET02 - For message Id: 498 Tag - value pair: 3 - 5902400000000
15:38:08.307 - (I) ET02 - For message Id: 498 Tag - value pair: 501 - 256000000000
15:38:08.307 - (I) ET02 - For message Id: 498 Tag - value pair: 502 - 0
15:38:08.307 - (I) ET02 - For message Id: 498 Tag - value pair: 503 - 0
15:38:08.307 - (I) ET02 - For message Id: 498 Tag - value pair: 504 - 9098150000
15:38:08.307 - (I) ET02 - For message Id: 498 Tag - value pair: 505 - 9098150000
std::sort(v.begin(), v.end());.sortI suggested then. But "first pair" isn't descriptive enough. I still have to guess what you mean.