Hello I am trying to assign some values to an array using a struct as the base. The struct is global above the main function. Is the way below the correct way to assign values to the array? When I print my array to the screen, none of the values that are printed are the values that I enter (its gibberish).
you use count as index of the array, where there have not been any assignment yet, so there is garbage there. Maybe entry[count-1] would give better results?
My intentions are to:
1. Input a character from a file.
2. If the character is alpha, check to see if it is upper case.
3. If the character is upper case, convert it to a lower case character.
4. Check the array to see if the character has already been entered.
a. If the character has already been entered, increment the counter in the array.
5. If the character has not been entered, enter the character into the array and increment the counter.
6. Repeat the process until all the characters have been processed from the file.
7. Print the array and its contents.