Ok....thanks for the help on my post yesterday and if you could help me once more it would be greatly appritiated. How do you refer to a previous character in c++? my program is going through a text file and echo printing each character and adding one to the counter each time it hits a space..this is how i am counting the words...however if you putt two spaces between two words then it add's two too the counter which poses an obvious problem...so I need it to count spaces only if the previos charcter was not a space but i havetn a clue how you refer to previous characters in a while loop...I could really use your help on this one.