OK, the first problem is the code to check the bet or quit.
1 2 3 4 5
|
cout << "\nPlace your bet and roll the dice (minimum $1 - 'q' to quit): ";
cin >> betChar;
if (betChar == q || betChar == 'Q');
exit(1);
bet=betChar;
|
The q should have quotes round it (as you are trying to check if ti matches the character q, not the varaible q).
The ; after the if ends the statement, so exit(1); is nto conditional - it will always occur.
So you wanted
1 2 3 4 5
|
cout << "\nPlace your bet and roll the dice (minimum $1 - 'q' to quit): ";
cin >> betChar;
if (betChar == 'q' || betChar == 'Q')
exit(1);
bet=betChar;
|
Only this is probably still not what you want, as it will only input a single character, and the line
will assign the ASCII value of the character to bet.
So a betChar of '1' gives a bet of 49.
To allow an input of more than 1 digit you will need to use a string rather than a char, and you will then need to convert this to an integer if it is not a 'q' or 'Q'.
Since you want to have the same code twice in the program be a reasonable idea to put the bet / quit code into a function.
NB: Use the 'Insert Code' button to create a pair of code tags and put your code between them to help make it more readable on the forum:-)