The way you have it is, char question;. This is fine, but a single char only holds one character.
So you have two options, have the user enter either 'Y' or 'N' like:
Code:
char question;
// ...
cout << "Go again?(Y/N): ";
cin >> question;
}
while(question == 'Y' || question == 'y');
Or, you can have a character array:
Code:
char question[5];
// ...
cout << "Enter yes to do it again: ";
cin.getline(question,5);
}while(strcmp("Yes",question));
You need the cstring header file for strcmp, and you use the getline() member function of cin for char arrays, that way you read the amount of characters you want.
Also you need to have 1 extra element in your array for a null terminator.
Hope that helps.