maybe trying taking the users input and then altering it to a way you can work with: e.g.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
cout << "Please enter [y/n]: ";
cin >> ans;
if(isupper(ans)) ans = tolower(ans); //checks is the input it a capital & if so, makes it lowercase
switch(ans)
{
case'y':
// code
break;
case'n':
// code
break;
}