Advertisement
EternalMugen

Untitled

Mar 23rd, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.87 KB | None | 0 0
  1. #include <iostream>
  2. #include <map>
  3. #include <string>
  4. #include <vector>
  5.  
  6. int main()
  7. {
  8.     //std::map<std::string, int> arr;
  9.    
  10.     std::vector<std::map<std::string, std::string>> person;
  11.     std::string s,l,f;
  12.  
  13.     while (s != "exit")
  14.     {
  15.         //arr[i] = rand()%(10-1+1)+1;
  16.         std::cout <<std::endl;
  17.         std::cout <<"Enter last_name: "<<std::flush;
  18.         std::cin >> s;
  19.         l =
  20.         person["last_name"] = s;
  21.  
  22.         std::cout <<"Enter first_name: "<<std::flush;
  23.         std::cin >> s;
  24.  
  25.         if (s == "exit")
  26.         {
  27.             break;
  28.         }
  29.  
  30.        
  31.     }
  32.     for (auto it = person.begin(); it != person.end(); it++)
  33.     {  
  34.         std::cout <<std::endl;
  35.         std::cout <<"Team - "<<it->first<<": "<<it->second<<std::endl;;
  36.        
  37.     }
  38.     // for (int i = 0; i < n; n++)
  39.     // {
  40.        
  41.     // }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement