Posts by Clarisse Simões Ribeiro • 46 points
2 posts
-
1
votes1
answer42
viewsA: Bubble not changing list values
Your bubbleSort has some problems: It attempts to access invalid data vector indexes: Aluno prox = aux.dados[j + 1]; //Quando j = 9, j+1=10 (índice inválido) Here you should make j range from 0 to…
c++answered Clarisse Simões Ribeiro 46 -
2
votes2
answers218
viewsA: How to go through a set with entered data?
You’re iterating on your std::set and changing the contents of this container at the same time (removing items). Removing elements invalidates the iterator you are currently using, but the method…