updated for presentation

This commit is contained in:
Stephen M. McQuay
2012-05-25 08:17:47 -06:00
parent b47b5c6f35
commit 530ccb5e37
7 changed files with 62 additions and 45 deletions
+4 -13
View File
@@ -14,18 +14,11 @@ const vector<string> mcquays = {
int main() {
for(auto name: mcquays) {
cout << name << endl;
}
// original with uint
// original with iterator
vector<int> nums = { 1, 2, 3, 4, 5 };
for(auto & n: nums) {
n--;
}
for(auto n: nums) {
cout << n << endl;
}
// fix so nums is 0, 1, 2 ...
map<string, int> age_for_mcquay = {
{"stephen", 31},
@@ -34,7 +27,5 @@ int main() {
{"derek", 21},
};
for(auto p: age_for_mcquay) {
cout << p.first << " " << p.second << endl;
}
// map example:
}