#include <iostream>
#include <map>
using namespace std;
int main() {
map<string, int> people = { {"Bill", 19}, {"Steve", 32}, {"Elon", 26} };
// 通过键移除元素
people.erase("Bill");
// 这会抛出错误,因为 Bill 已不存在
cout << "Bill 的年龄是: " << people.at("Bill") << "\n";
return 0;
}