How to alphabetically sort strings?

You could use std::set or std::multiset (if you will allow repeated items) of strings, and it will keep the items sorted automatically (you could even change the sorting criteria if you want). input: Gerardo Carlos Kamilo Angel Bosco output: