1

これを使用して、別の std::string 内の std::string の発生をカウントしようとしています:

   static int cantidadSimbolos(const std::string & aLinea/*=aDefaultConstString*/,
                                  const std::string & aSimbolo/*=aDefaultSimbolSeparador*/)
        {
            if(aSimbolo.empty()) return 0;
            if (aLinea.empty()) return  0;
            int aResultado=0;
//This is the line that the compiler doesnt like
           aResultado=std::count(aLinea.begin(),aLinea.end(),aSimbolo);
            return aResultado;
        }

しかし、コンパイラはそれを好みません。これは、コンパイラが発行するエラーです。

エラー: '_first' の 'operator==' に一致しません_gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* >() == __value'</p>

何か助けて?? 事前にt​​hx!

4

1 に答える 1