Advertisement
w1q1w

-

Sep 3rd, 2020
1,688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. Dictionary operator-(const Dictionary& temp1 , const Dictionary& temp2)
  2. {
  3.      Dictionary temp;
  4.      std::map<std::string,std::string>::const_iterator it;
  5.      std::map<std::string,std::string>::const_iterator it2;
  6.    
  7.     for(it=temp1.WordCard.begin() ; it!=temp1.WordCard.end() ; it++)
  8.     {
  9.       for(it2 = temp2.WordCard.begin() ; it2!=temp2.WordCard.end() ; it2++)
  10.       {
  11.         if(it->second!=it2->second)
  12.         {
  13.           temp.WordCard[it->first] = it->second;
  14.         }
  15.       }
  16.     }
  17.  
  18.     temp.DicSize = temp.WordCard.size();
  19.    
  20.     return temp;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement