I'm still so stuck on this problem. I keep getting the same error. I have looked at it for a long time now and no progress.
error C2664: 'freqHelp' : cannot convert parameter 1 from 'char' to 'std::string &'
When I read the error I think that this is a mix up of the types. OK, so then I got to where the error is and I'm so stuck still.
I'm trying to take an array of of integers 1-26 from the alphabet. I'm going to give the array to a function. This function within my function to take the array will then go through each word. It will convert the word to uppercase then it will -65. So when it gets stored in the array that is of type int with size 26 the position 0 will correspond to A and it will be incremented one every time a letter is stored ( at that postion that is). OK hopefully you guys understand me I have tried hard to explain my purpose hopefully looking at the code will connect this better for you.
Moscow, I thought it was OK. I convert the index at i to upper so now if Subtract 65 then it places it between one and 26 which I was trying to store in an array of size 26 for the alphabet. The i++ will increment it for example 65-65 =0 ++ is 1 so it can be stored in an array and pos 1 is incremented by one.
Whats wrong with that idea? I don;t know how that is invalid in the code. At least the above it the idea I was shooting for.
void freqHelp(string& str1)
for(string::size_type i =0; i < str1.size(); i++)
OK so this part what my brain is trying to do is to take a word str1 use 
to mean the same thing as str1.at(). So I call that str1[i]. I just used I so when the loop goes it will increment the position one by one getting all the letters from the word converting them to upper case. I think that toupper() converts the letter at position i to uppercase. So 'a' becomes 'A'. I was trying to make that happen with this statement. Then the str1[i-65]++, was just a attempt to take i which is now uppercase and subtract 65 and add one so I can store it in an array at what ever position that is. For instance 65-65=0 then ++ makes it one so when it is put into an array of chars it will store it in position i. Thats what I shooting for or trying to accomplish.
Thx hopefully that explains it
OK thanks I will try out your "idea" TheIdeasMan (1235). For the contradiction
ignoring the c++ lingo and just saying it in english. I just want to take a word and count each letter. So the word " apple" has 1 a, 2 p's, 1 l, and 1 e. So take p for instance I just want to count that and store that number in an array. I said it this way so hopefully I won't confuse myself if I try and explain it in c++ lingo. But back to c++ ha. I will take that count of 2 and have an array of 26 and that each letter will go to its proper place in the alphabet.
I really hope that I made it clear. I'm going to try that idea above though. Maybe I can work with that. I know what I want to do the problem for me always is expressing that properly in c++. What a battle thanks for the help dude.
I will try it after a bit see how it goes.
Hi I tried to do something like suggested above. I"m getting the craziest output ever! It compiles but I get some sort of block like thing. I'm supposed to get numbers. I can't even describe this compile it you will see wtf!
//A function to determine frequency of letters
void fillFrequency(string str1, char freqcount, constint alphabet)
for(string::size_type i = 0; i <str1.size(); i++)
i = toupper(str1[i]); //don't reuse the loop variable
position = toupper(str1[i]) - 'A'; //better to use the char rather than a number
position = i- 'A'; //combined these together in line above
for( int j = 0; j < alphabet; j++) //no need to cycle through alphabet
(freqcount[position])++; //parentheses for precedence