Quote:
Originally posted by mana
i been asked to write a program that accepts a word into a string variable, and it has to display the number of the vowels and the number of consonants of the word.
would you help me solve this?
i don't know how to get the words separated (vowels from consontats)
#include <iostream.h>
int main ()
{
char word, vowel, consonat;
cout<<"Please enter a word"<<endl;
cin>>word
First and foremost, you can't use a character to hold a word. You need to have an array of characters (or a character pointer to an allocated amount of memory). You seem pretty new so I'm just going to suggest that you look up character pointers (