im doing an assignment for college and i need some help im on assignment 2 but you will need the info from 1 also
assignment 1 Write a value returning function isVowel that returns the value true if a given character is a vowel and otherwise returns false also write a program to test your function.
assignment 2 write a program that prompts the user to unput a sequence of characters and outputs the number of vowels (use the function isVowel written in programming assignment 1.)
heres my code:
#include <iostream>
using namespace std;
bool isVowel(char ch);
int main ()
{
char ch;
string test = "Enter a series of integers";\
cin >> ch;
for(int i = 0; i < test.size(); i++){ //here i get an error saying obsolete binding at i
if(isVowel(test[i])){
cout << test[i] << " ";
}
}
cout << endl;
cout<<"Enter a series of integers: "<<endl;
cin>>ch;
cin.ignore(300,'\n');
cout << "the number of vowels is " << i << " " << endl; //here i get an error saying name lookup of i changed for new ISO "for" scoping
cout << "Press any key to exit" << endl;
cin.get();
return 0;
}