Advertisement
Josif_tepe

Untitled

Sep 11th, 2021
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <map>
  3. using namespace std;
  4.  
  5. int main() {
  6.     map<string, string> mapa;
  7.    
  8.     mapa["Josif"] = "Tepegjozov";
  9.     mapa["Cedo"] = "Trpeski";
  10.     mapa["Marija"] = "Stankoska";
  11.    
  12.     for(map<string, string>::iterator it = mapa.begin(); it != mapa.end(); it++) {
  13.         cout << it->first << " " << it->second << endl;
  14.     }
  15.    
  16.     for(auto i : mapa) {
  17.         cout << i.first << " " << i.second << endl;
  18.     }
  19.     return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement