I have a vector of struct items that has a string inside. I am trying to sort the vector of items by having the string inside the items in alphabetical order... so far I have:
vector<Item> sorter;
std::sort(sorter.begin(), sorter.end(), SortHelp);
//predcate function
bool SortHelp(Item const& one, Item const& two)
{
return one.type < two.type;
}
*type is the string that I am using to sort
How could I change the predicate function to sort the strings alphabetically?