Member Avatar for angelshonu11

If anyone can send a program "Which counts how many times a particular word is repeated in a file" using File Handling...
E-mail: <EMAIL SNIPPED>

Clinton Portis commented: what the hell is your problem -2

Recommended Answers

All 2 Replies

Welcome to DaniWeb! We are all about learning here. No one really benefits if we just write code for you. What you should do is:

1) remove punctuation: http://programmingexamples.net/index.php?title=CPP/Strings/DetectPunctuationparse

2) parse the file on ' ' : http://programmingexamples.net/index.php?title=CPP/Strings/Split

3) put all of the words in a std::set and keep track of how many times the insert failed (i.e. the word was already in the set) using an std::map with key: word value: count

Once you try each of those steps, feel free to ask if you have any questions.

Good luck,

David

Edited into oblivion...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.