Hello again C++ WORLD! I am once again having trouble with my program. I am trying to creat a program that will count the total number of characters, the number of letters, total upper and total lowercase, total punctiations and total numbers in the input. Also re-write the code in all caps. I have written it thus far (without the code to make it turn into all caps) where there are no errors (build errors) but It does not do anything when ran. I need any kind of help with what is wrong with how I wrote the program and what I can do to make it run.
P.S. Teacher says I need the functions cin.get(), int isAlpha(), int isDigit(), int isUpper(), and int isLower(). Thanks in advance for all the help!
Wow!! Thanks guys!!! The only problem I am having now is that am I getting a crazy number for my CharCount???? Im sure that's an error in computation on my part so I can figure that out. Thanks again !!!!
On the last iteration of the loop, what happens? IsChar() depends on the values updated by the function calls following it. Is that order right? Do you really want to be adding CharCount to the value it returns?
Since IsChar doesn't do what one would think it should, you can move it out of the loop entirely and just call it after.
I suspect, however, that your instructor is expecting the definition of isChar to look more like:
1 2 3 4 5
int isChar(char c)
{
// Yes, I realize you don't have an IsPunct() function. You get the drift!
return IsAlpha(c) || IsDigit(c) || IsPunct(c) ;
}
wow seriously... THANKS!!!! I've been really stuck (prob because I'm a beginner lol) but all the help is GREATLY APPRECIATED!!!! and that's a thanks to EVERYONE!!