Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
at_multimap_example
// Demonstrates at() #include <iostream> #include <string> #include <unordered_map> int main () { //Initializing a map with values std::unordered_map<std::string,int> mymap = { { "First", 100}, { "Second", 200}, { "Third", 300 } }; //Updating values with the help of at() method mymap.at("First") = 50; mymap.at("Second") += 500; mymap.at("Third") = mymap.at("First") + 950; //Printing all three values for (auto& x: mymap) { std::cout << x.first << ": " << x.second << std::endl; } return 0; }
run
|
edit
|
history
|
help
0
error
frequsency
Pairs with given sum
ListCPP
Height of a binary tree
Aiutttt
GoF interpreter
Best buy/sell day in stock
c++
c++ mouse