C++11: Cleaned up program framework with range-based for

This commit is contained in:
Paul Beckingham 2015-05-11 17:50:53 -04:00
parent 5a57dfd70d
commit e74c6963a9
28 changed files with 937 additions and 1221 deletions

View file

@ -141,9 +141,8 @@ int main (int argc, char** argv)
e.evaluatePostfixExpression (expression, result);
// Show any debug output.
std::vector <std::string>::iterator i;
for (i = context.debugMessages.begin (); i != context.debugMessages.end (); ++i)
std::cout << *i << "\n";
for (auto& i : context.debugMessages)
std::cout << i << "\n";
// Show the result in string form.
std::cout << (std::string) result