in my final project, a poker simulator and a black jack, my main function does not seem to want cin to work. The whole project is a syntax error, so this is not a problem, but in order to check if it works or not, I need a βcinβ to work. The following is my main function when I have problems:
#include <iostream> using namespace std;
Every time I use "cin" in a do while loop, it doesn't let me type anything. A program never stops for user input. like not, it outputs the program:
"please enter a starting amount to bet with" *user can enter starting amount here, this "cin" works no problem* "input '1' for poker and '0' for black jack" "I'm sorry, the input you entered was invalid" "please try again" "would you like to try again?" "('y' for yes, or 'n' for no)
then the program ends because none of the options has any meaning in them. I will include more code if asked, but I believe this is the problem. Thanks to everyone who can help me!
edit: the program does enter a do while loop, and all messages are printed as they should be, but the program does not allow me to enter any data at all, it does not stop me from entering data, it just acts as if it does not exist.
source share