Homework/HW05/main.cc
void readStopList(HashTable &stopList)
{
    char word[KEYWORDSIZE];
    ifstream fin("stopWords");
    if (!fin.good())
    {
        cout << "error reading the stop list file" << endl;
        exit(1);
    }
    WordCounter wordc;
    do 
    {
        fin >> word;
        if (!fin.eof()) 
        {
            wordc.setWord(word);
            stopList.insert(wordc);
        }
    } while (!fin.eof());
    fin.close();
}
// Inputs the stopList and stores it in the table.
Inputs the stopList and stores it in the table.
Inputs the stopList and stores it in the table .
void readStopList(HashTable &stopList)
{
    char word[KEYWORDSIZE];
    ifstream fin("stopWords");
    if (!fin.good())
    {
        cout << "error reading the stop list file" << endl;
        exit(1);
    }
    WordCounter wordc;
    do 
    {
        fin >> word;
        if (!fin.eof()) 
        {
            wordc.setWord(word);
            stopList.insert(wordc);
        }
    } while (!fin.eof());
    fin.close();
}
void readStopList ( HashTable & stopList ) { char word [ KEYWORDSIZE ] ; ifstream fin ( " " ) ; if ( ! fin . good ( ) ) { cout << " " << endl ; exit ( 1 ) ; } WordCounter wordc ; do { fin >> word ; if ( ! fin . eof ( ) ) { wordc . setWord ( word ) ; stopList . insert ( wordc ) ; } } while ( ! fin . eof ( ) ) ; fin . close ( ) ; }
Inputs the stopList and stores it in the table.
Inputs the stopList and stores it in the table .