The program runs fine the first time through, but when asked to do another, it gets to in_name(), prints "Enter your full name:" and then it errors with "Aborted" and exits. I've tried setting full="" and cin.clear() but still nothing.
Here are two the relevant functions:
Code:
int main()
{
char cont = 'Y';
while(cont == 'Y')
{
in_name();
parse();
out_name();
cout<<"Another? ([Y]es or [No)";
cin >> cont;
cont = toupper(cont);
}
return 0;
}
Code:
void in_name()
{
cout << "Enter your full name: ";
getline(cin, full);
}