this worked a few times and now its not :( anny help would be greatly appretiated
#include <iostream>
#include <string>
using namespace std;
string vowels(string str)
{
string vow = "aeiouAEIOU";
for(size_t i = 0; i <= str.length()+1; i++)
{
str.erase((str.find_first_of(vow)),1);
}
return str;
}
int main()
{
string str;
cout << "Enter a string of charecters." << endl;
cin >> str;
vowels(str);
return 0;
}