mercredi 6 mai 2015

Can someone please clarify what the "<" does when comparing two strings c++ [duplicate]

This question already has an answer here:

I had a past paper question involving the STL sort algorithm. And it was sorting a vector, i am aware that the sort algorithm sorts into ascending order using the "<" operator. However, I was wondering how two strings are compared? How is a value for a string found? (So i can work out what string is smaller than another in an exam.)

Aucun commentaire:

Enregistrer un commentaire