Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <utility>
- #include <vector>
- using namespace std;
- int main() {
- vector people {
- pair{ "Bill", 27 },
- { "Jane", 23 },
- { "Phill", 34 },
- };
- for (auto [name, age] : people) {
- cout << name << ' ' << age << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment