std::vector<std::pair<int, int*>> temp;
std::pair<int, int*> pair;
//add to pair here
temp.push_back(pair);
std::sort(temp.begin(), temp.end());
I am guessing this code works and will sort the temp vector and not hidden gotchas? I just need the pointers sorted based on some priority value
Thanks
It will sort the pairs sorted first by the first element of each pair and then the value of the pointer in case of ties.
It will sort the pairs sorted first by the first element of each pair and then the value of the pointer in case of ties.
Thanks for the help SiCrane. Should work for what I need.