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
}