The while statement on line 19 is incorrect -- you don't need numOfInput. To read the entire file the while statement should be constructed like this:
while( inStream>>deweyDecimal )
{
// blabla
}
But that will only read one word. If each line in the file contains more than one word then you will want to use getline() while( getline(inStream, deweyDecimal) )
{
// blabla
}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343