Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
using namespace std; int main() { map
people = { {"John", 32}, {"Adele", 45}, {"Bo", 29} }; // Loop through the map with an iterator for (auto it = people.begin(); it != people.end(); ++it) { cout << it->first << " is: " << it->second << "\n"; } return 0; }
Adele is: 45
Bo is: 29
John is: 32