Need help with counting vowels prog

This is a discussion on Need help with counting vowels prog within the C++ Programming forums, part of the General Programming Boards category; ok so i have to write a program that counts the # of vowels from the file. my only problem ...

Need help with counting vowels prog

ok so i have to write a program that counts the # of vowels from the file. my only problem is i know how to get the total but i cant figure out how to get the total number of a/A's, e/E's, and so on. need help asap.....the following is what i have so far:

Just as you've missed the existence of a standard function for conversion to upper case, and the fact that your function assumes a specific (type of) character set.

Of course, the examples here presume the english language as well.

The actual definition of a vowel is a bit deeper than "in the set aeiou".

The phonetic definition of a vowel is a sound in spoken language pronounced with an open vocal tract so that there is no build-up of air pressure at any point above the glottis. This contrasts with consonants where there is a constriction or closure at some point along the vocal tract.

The phonological definition of a vowel is "sound that forms a peak of a syllable" (the 'a' in "cat" is the peak).

Technically, there is sometimes conflict between these definitions. For example, 'y' and 'w' (as pronounced in the English words "yes" and "wet") are produced without much constriction of the vocal tract so, phonetically they can be considered to be vowels but phonologically they are not pronounced at the peak.

If you want a real challenge, try to write a program that counts vowels - by one of these definitions - that works for any spoken or written language

If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Just as you've missed the existence of a standard function for conversion to upper case, and the fact that your function assumes a specific (type of) character set.

No, Im completly aware of that. The fact that I wrote a simple function was simply because I felt like it.

Im not missing the existence of standard functions, but I often encourage people to write their own functions, that is a matter of opinion. But you've missed one thing: It was not written to convert any character set nor only vowels to upper case. This simple function was written with the ascii character set in mind, so it works with it. Complaining about that is the same as saying that a ps3 should run xbox 360 games simply because both consoles were made to run games.

Of course, the examples here presume the english language as well.

The actual definition of a vowel is a bit deeper than "in the set aeiou".

The phonetic definition of a vowel is a sound in spoken language pronounced with an open vocal tract so that there is no build-up of air pressure at any point above the glottis. This contrasts with consonants where there is a constriction or closure at some point along the vocal tract.

The phonological definition of a vowel is "sound that forms a peak of a syllable" (the 'a' in "cat" is the peak).

Technically, there is sometimes conflict between these definitions. For example, 'y' and 'w' (as pronounced in the English words "yes" and "wet") are produced without much constriction of the vocal tract so, phonetically they can be considered to be vowels but phonologically they are not pronounced at the peak.

If you want a real challenge, try to write a program that counts vowels - by one of these definitions - that works for any spoken or written language

... So? Again, the function was written to convert any ascii character set lower case letter to its upper case representation, not only its vowels. My first language is portuguese(portuguÍs) for Im brasilian. You can safely say that Im aware of that better than many english speakers, but it should come as no surprise that Im not worried with that now.

"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens