Well, that line appears twice. I'm guessing your array indices are getting off somehow -- if you are using Visual Studio, when you hit F5 and your program stops, you should see the current "state of play" of your program, so you can see what all your variables are. Granted, at the moment I don't see how newwordcount gets past 0, so I don't see how a lot of the code actually gets executed.