Flickyyy

Beautiful Cpp

Oct 30th, 2020
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <utility>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. int main() {
  7.     vector people {
  8.         pair{ "Bill",  27 },
  9.             { "Jane",  23 },
  10.             { "Phill", 34 },
  11.     };
  12.  
  13.     for (auto [name, age] : people) {
  14.         cout << name << ' ' << age << endl;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment