Hi folks,
I've been trying to solve this but I keep hitting a brick wall. Here's what I am trying to do: I'm reading a file with text in it, I am storing every letter of this file as an element of this array (this part is already done) and I've also terminated the array with \0. Now, I want to be able to count how many repetitions are for each letter.
What I was thinking of doing is:
- Create a new array to hold the letters (E.g letters [26] (english alphabet only)
- The array would look like {45,23,434,35,....,90}
- So if letter[0] = 45 that would mean there are 45 a's or letter[1] = 99 there are 99 b's
What I'm having problems with is, how do I iterate through textStr and add this type of functionality?