problems with using the "cin" object
<p>in my final project, a poker and black jack simulator, my main function doesn't appear to want "cin" to work. The entire project is syntax error free, so that's not a problem, but in order to test to see if it runs or not, I need "cin" to work. The following is my main function, where I seem to be having the trouble:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

#include "card.h"

#include "poker.h"

#include "blackJack.h"





void handlePoker(int&amp;);

void handleBlackJack(int&amp;);

//TO DO:

//FIX CIN PROBLEM

//*pulls hair out*





//main function:

//asks the user what game they want to play

//then calls a function for the appropriate

//game chosen

int main()

{   //two choices:

    //one for quitting the program

    //the other for whichever game they want

    char yesOrNo;

char choice;

int totalMoney;

cout&lt;&lt; "please enter a starting amount to bet with"&lt;&lt;endl;

cin&gt;&gt; totalMoney;

do{

    //ask the user which game they want

    cout&lt;&lt;"would you like to play poker or black jack?"&lt;&lt;endl;

    cout&lt;&lt;"input '1' for poker and '0' for blackjack"&lt;&lt;endl;

    cin&gt;&gt;choice;



    if(choice == '1')

    {

        handlePoker(totalMoney);

    }

    else if(choice == '0')

    {

        handleBlackJack(totalMoney);

    }

    else

    {

        cout&lt;&lt;"I'm sorry, the input you entered was invalid"&lt;&lt;endl;

        cout&lt;&lt;"please try again"&lt;&lt;endl;

    }

    cout&lt;&lt;"would you like to try again?"&lt;&lt;endl;

    cout&lt;&lt;"('y' for yes, or 'n' for no)"&lt;&lt;endl&lt;&lt;endl;

    cin&gt;&gt;yesOrNo;

}while(yesOrNo == 'y' || yesOrNo == 'Y');

}
</code></pre>

<p>Everytime I use "cin" in the do while loop, it won't let me input anything. The program never stops for user input.
as it is not, he's the program's output:</p>

<pre><code>"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)
</code></pre>

<p>then the program ends, because none of the choices have any value in them.
I'll include more code if asked, but I believe this is where the problem with it lies.
thank you to all who may help me!</p>

<p>edit: The program does enter the do while loop, and all messages are printed as they should bee, but the program won't let me input any data at all, it doesn't stop to let me input data, it just acts as if they do not exist.</p>
