Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

vector erase not working c++

for (int i = 0; i < numbers.size(); i++){
    if (numbers[i] == 1){
        numbers.erase(numbers.begin() + i);
        i--;
    }
}
 
PREVIOUS NEXT
Tagged: #vector #erase #working
ADD COMMENT
Topic
Name
8+5 =