Код: Выделить всё
string foo = "bar";
for(int i = 0; i < foo.length(); i++){
//some code that does not modify the length of foo
}
Подробнее здесь: https://stackoverflow.com/questions/813 ... timization
Код: Выделить всё
string foo = "bar";
for(int i = 0; i < foo.length(); i++){
//some code that does not modify the length of foo
}