Relative Content

Tag Archive for c++functionmultidimensional-array

C++ can anyone help me so that my wordCount function when it sees the same word update the counter associated with that word

So I am working on a project where I have to make a code where it can read a txt file and then it will store the words of the file and then count the occurrence of words in the file and then print out the 10 most occurring, 10 least occurring and unique words(words that appear once, least and unique will overlap but that is fine) the main issue is the my wordCount function which is meant to go through the array I have and then record the occurrence of each word into a counter array ie if the word “The” is in the file and appeared 10 times “The” would have a corresponding counter of 10. Additionally is that I am not allowed to use string. Anyway here is the code that I am having trouble with