Josif_tepe

Untitled

May 15th, 2026
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <map>
  3. using namespace std;
  4.  
  5. int main() {
  6.     map<int, string> m = {{1, "Geeks"},
  7.              {2, "For"}, {3, "Geeks"}};
  8.  
  9.     m[0] = "Tweaks";
  10.     m.at(1) = "By";
  11.    
  12.     cout << m[0] << endl;
  13.     cout << m.at(1);
  14.     return 0;
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment