Hi all.
I want to create a small application that takes a file as a parameter and performs the following tasks :
counts the number of characters.
counts the number of white spaces.
counts the number of lines.
counts the number of words.
search for a specific
word.
but the problem is that I am't sure about these algorithms.
so would you mind giving me some tips to create these methods ?
(like how could I know that this line has ended and how to know that the word has ended)
here is some code :
any corrections about the previous code ?
I think there is some thing wrong with counting the spaces and chars, what do you think ?
thanks
alot.