moevic
asked on
c++ : search and count how many times a word appears in a file
I need a code snipped to do the following:
Search files: When specifying string to be searched,the program should returns a list of all the files which had
matches within them, as well as the number of matches e.g.
Files containing search string: HELLO
sally.txt: 333
bob.txt: 32
mike.txt: 2
I don't know any method/function that can go word for word in a file, in c++. Something like a java string tokenizer maybe!
Search files: When specifying string to be searched,the program should returns a list of all the files which had
matches within them, as well as the number of matches e.g.
Files containing search string: HELLO
sally.txt: 333
bob.txt: 32
mike.txt: 2
I don't know any method/function that can go word for word in a file, in c++. Something like a java string tokenizer maybe!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
moevic:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
Mayank.