Posts by Rocha • 61 points
1 post
-
6
votes3
answers3071
viewsQ: Does anyone know how to insert names in alphabetical order into a c++ vector?
I made this code but it doesn’t work right, it inserts in alphabetical order backwards. void inserirNomeNaLista(vector<string> &lista) { vector<string>::iterator itr; string nome;…