So I have something like this
int age;
for (auto person : persons) {
age = std::stoi(person[0]);
/* Do other stuff with age in this loop*/
}
Other than style, are there any performance benefits to declaring int age = std::stoi(person[0]);
inside the loop?