cout << "Enter your bet->";
cin >> bet;
while (cin.fail())
{
cout << "Invalid input, please restate->";
cin >> bet;
}
Should catch the program before it 'bottoms out'; I think
I should elaborate.. if what the user enters is not compatable with the variable type in which it is to be stored.. you'll get that unexpected behavior.
Someone should correct me on this If I'm wrong