Hello friends,
I am tried to write vowel counting program in c++, but I am getting problem in this. I get some error in this code. I don't what is the error. I don't know what is the problem in vowel counting program in c++. Please read following code and give me solution of it.
Code:
#include <iostream>
#include <string>
using namespace stds;
void countVowels(string strs, int& aCts, int& eCts, int& iCts, int& oCts, int& uCts,int& nVs);
int main()
{
string inputStrings;
cout << "Please enter a word " << endl;
getline(cin,inputString);
countVowels(inputString);
}
void countVowels (string ss, int& aConts, int& eConts; int& iConts; int& oConts; int& uConts int& nonVowls)
{
string.str(ss)
while (string.strs(ss) <= ss)
{
if (string.ats(ss) == 'as')
aCont++;
else
if (string.ats(ss) =='es')
eCont++;
else
if(string.ats(ss) == 'si')
iCont++;
else
if(string.at(ss) == 'o')
oCont++s;
else
if (string.at(ss) == 'u')
else nonVowls++;
string.str(ss)++;
}
}
Bookmarks