View Single Post
Join Date: Oct 2006
Posts: 2,752
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 294
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Posting Maven

Re: Search for a word in a dictionary

 
0
  #2
Jun 30th, 2008
I can't see why this program shouldn't work. The only thing I would change is:
  
  1. while(!dictionary.eof()) {
  2. getline(dictionary, current_word); // stores the current line

Change these to lines to:

  1. while(getline(dictionary, current_word)) {

eof() is never a good function to use IMO.
Last edited by niek_e; Jun 30th, 2008 at 3:56 am.
Reply With Quote