Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
using namespace std; int main() { // Create a map that will store the name and age of different people map
people = { {"John", 32}, {"Adele", 45}, {"Bo", 29} }; // Try to access an element that does not exist (throws an exception) cout << people.at("Jenny"); return 0; }
terminate called after throwing an instance of 'std::out_of_range'
what(): map::at