I appreciate that you got someone to try to help you, but now you are stuck with too much stuff to think about at once. In particular, you have too many functions. Try to get rid of freqHelp() at the least.
I liked your original code better.
Your freqcount[] array should be an array of what? (Currently it is an array of strings. Remember that you are
counting things with it.)
Something important that you are struggling with right now is the idea that everything has a
type -- that is, everything is a certain
kind of thing. A string is a thing that is a list of characters. A character is a number that represents some piece of text that humans read, like the letter 'A' or a question mark '?'. An integer is a negative or non-negative whole number, including zero.
A
variable is the corporeal manifestation of a type:
1 2 3 4
|
string name = "Jacob";
int days_in_a_week = 7;
char middle_initial = 'D';
float pi = 3.1415926;
|
You cannot mix things of different types.
name = pi;
doesn't make sense, because a number is not a string.
After all that, consider what is meant by
onlyAlpha(str1[i])
when onlyAlpha()'s argument is a reference to a
string. (Remember, what is the type of
str1[i]
?)
Seriously, though, you do need to work on figuring this out for yourself. You are actually doing pretty well, but all the people trying to help you are doing you a disservice. If I were you, I would start over with the code you started with. Get rid of the great big switch statement and use the operations I told you about.
In order to use them, you will have to read up on how to use functions. Try the tutorial here, it will help you considerably.
http://www.cplusplus.com/doc/tutorial/
Good luck!