looking for a function

This is a discussion on looking for a function within the C++ Programming forums, part of the General Programming Boards category; I am supposed to use a 'library function' to check if a letter is a vowel. My guess is that ...

looking for a function

I am supposed to use a 'library function' to check if a letter is a vowel. My guess is that the function is in the cctype header - but I don't know the function - or if one even exists. Could someone point me to this function, and an example of it's use please?

"Design a program that asks the usr to input a letter. Use a library
function to determine and output whether or not the letter is a
vowel..."

I know isalpha checks for a letter - but the directions in the exercise do seem a tad confusing - so what I'll do, is check for a letter with isalpha() and then write some code to check for a vowel with an if statement.

Writing such a function is not as easy as it may first seems: vowels and consonants are not written with the same letters in all writing systems, and sometimes whether a letter is a vowel or consonant depends on the context.

Take for example the letter Y. In English sometimes it's a vowel (lady), sometimes a consonant (year), and sometimes a diphtong (my). In other languagues it's always a consonant (Spanish), and in yet others always a vowel (Finnish).

Well, I'm having trouble compiling - something is wrong with a static cast that tried to put together... also - could you guys help me double check my program's logic? I'm not sure the program is going to act like it is supposed to. So here's the order of operation that I want: Get user input, check for a letter, tell if said letter is uppercase or lowercase, check for a vowel, and then output the letter as lowercase at the end.

Using a ton of if statements always seems to confuse me!
EDIT: along with confusing me - I can never get clean formatting when I use them.

Hey I apprechiate the fixes! thank you! What I want to do though, is actually change the value of the letter to it's uppcase equivalent - that's what I wanted to do with the static cast to type char - but I guess I misunderstood how that worked with toupper()/tolower()....

Could you show me how to change, say letter a to A and then store it? Because in my program, before it checks if the letter is a vowel - it skips the static cast and goes straight into the conditional if statement. when it should change the letter to uppercase and then go through the condtional statement.