I have a set of strings
set<string> strings;
How do I get the longest string contained in the set? In python I could do the following:
print max(strings, key=len)
Is there a similar function in c++?
Aucun commentaire:
Enregistrer un commentaire