Hi, all
its me again!
I got really stuck by the STL library and do not know how to correct that.

Here is my class code:

class A
    A( const string& filename )
       ifstream file(filename.c_str()) ;
        string word;
       while( file >> word)
    StringIntVector topNWords(size_t n) const;
     bool isnotpuct() const;
    // this function is to judge weather the text inside the file
    // is punctuations.
    vector<string> _word_list;


Here is my isnotpuct() function

bool TextUtil::isnotpuct() const
        for(size_t i=0; i<_word_list.size(); i++)
       for(size_t j=0; j<_word_list[i].length();j++)
            return false;
            return true;

Here is my topNWords function

//stringvector is the type--
//typedef vector< pair < string, int > > StringIntVector;

StringIntVector TextUtil::topNWords(size_t n) const
    map<string, int> freq;
   StringIntVector vRet;
    for(size_t i=0; i<_word_list.size(); i++)
      string words = _word_list[i];
      size_t topn = wordCount(words);
      freq[words] = topn;
    map<string, int>::const_iterator iter;
    for (iter=freq.begin(); iter != freq.end(); iter++)
      return vRet;

So i got the error message

Error    2    error C2784: 'bool std::operator ==(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const std::basic_string<_Elem,_Traits,_Ax>'

Which i was thinking it may caused by the bool isnotpuct() function
am i correct??
So how to correct it??
Many thanks.

What exactly is wordCount counting? Aren't you passing it a single word?