the folllowing code i have made but its not catering for the vowels coming together...what should i do in this code to accurately count the number of vowels and count the remining char left in string without vowels as after tokenization only the first token remains in the char array/string being tokenized...plz helpInline Code Example Here
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int vowelcounter=0;
char * tokenPtr;
char myarray[]="My name is Faraz Saleem Rafai";
char check[]="'a','e','i','o','u'";
tokenPtr=strtok(myarray,check);
while(tokenPtr!=NULL)
{
cout<<tokenPtr<<endl;
tokenPtr=strtok(NULL,check);
vowelcounter++;
}
cout<<myarray<<endl;
cout<<vowelcounter<<endl;
return 0;
}