Sorting a field in ascending and descending order

Hi!
I need to Sort a records of employees by their last name in ascending and descending order. And these records are from employee database.
Great, how much do you pay?
Okay, so you'll need to look at the following links. First, you'll want to read up on std::string objects.
http://cplusplus.com/reference/string/string/

Next, you'll want to see an example using the default std::sort which sorts in ascending order.
http://cplusplus.com/reference/algorithm/sort/

Finally, you'll want to see an example using sort with the predicate for sorting in descending order.
http://cplusplus.com/reference/std/functional/greater/

That should get you started. Good luck!
Topic archived. No new replies allowed.