mercredi 6 mai 2020

Error in using find() function in map

unordered_map<string, int> map;
    int m = B.size();
    int n=A.size();
    for(int i=0; i<m; i++) map[B[i]]++;
    for(int end=0; end<n; end=end+1)
    {

      if(map.find(A.substr(end, 3))!=A.empty() && map[A.substr(end, 3)]>0)
      {  something here;
      }

    }

I find error while using the find() operator or " != " for a map with key as string and value as int. ERROR OUTPUT

Aucun commentaire:

Enregistrer un commentaire