主页
C++
C++ 映射
demo_maps_change
运行 ❯
×
更改方向
保存代码
更改主题
#include
#include
using namespace std; int main() { map
people = { {"John", 32}, {"Adele", 45}, {"Bo", 29} }; // Change John's value to 50 instead of 32 people["John"] = 50; cout << "John is: " << people["John"]; return 0; }
John is: 50