Playground
#include <iostream> #include <map> using namespace std; int main() { map<string, int> m; m["prv"] = 13; m["vtor"] = 17; m["tret"] = 8; m["tret"] = m["tret"] + 12; //m["tret"] = 20 cout << m["prv"] << endl; //pechati '13' cout << m["vtor"] << endl; //pechati '17' cout << (m["prv"] + m["vtor"]) << endl; //pechati '30' return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!