jeudi 22 juin 2017

Trying to get the size of a set

bool isone = false;
set<string> aa;
if (aa.size() == 1) {
  isone = true;
}

I am trying to get the size of a string set. But I get this error. Any suggestion will be appreciated.

no match for ‘operator==’ (operand types are ‘std::basic_string::iterator {aka __gnu_cxx::__normal_iterator >}’ and ‘const char [6]’)

Aucun commentaire:

Enregistrer un commentaire