C++ Blackjack Gameplay
<p>Alright, so I'm really new to programming, and i'm trying to make a Blackjack game for a class I am taking. I've got the gist of everything so far, but when it comes to the actual gamep lay part, i'm having trouble. When I look at my code, I can't see why my game won't function right. I expect it to be an easier fix than I am seeing, because I usually miss the small things.</p>

<pre><code>for(;;)
{
    cout &lt;&lt; "1)Bet, 2)Hit or 3)Stay?\n";
    cin &gt;&gt; ans;

    if(ans == 1)
    {

    }

    if(ans == 2)        // Hit
    {

        Console::Clear();
        cout &lt;&lt; "Your Hand\n";
        Player.AddCard(Deck.Draw());
        cout &lt;&lt; "\nHand Value: " &lt;&lt; Player.HandValue() &lt;&lt; "\n";
        Player.Show();

        if(Player.HandValue() &gt; 21)
        {
            cout &lt;&lt; "You Busted man...Sorry :/\n\n"
                //&lt;&lt; "Dealer's Hand\n\n";
                //Dealer.Show();

        }

            else if(Player.HandValue() == 21)
            {
                cout &lt;&lt; "You've Won Your Freedom! :D";
            }

        while( Dealer.HandValue() &lt;= 17)
        {
            Dealer.AddCard(Deck.Draw());
            Dealer.Show(1);

            if(Dealer.HandValue() &gt; 21)
            {
               cout &lt;&lt; "Dealer Busted man...You Win! :D\n"
                    &lt;&lt; "\nDealer's Hand\n";
                    Dealer.Show();
            }

            else if(Dealer.HandValue() == 21)
            {
                cout &lt;&lt; "Dealer Wins...Your Soul! &gt;:D\n"

            }

        }

    if(Player.HandValue() &gt; Dealer.HandValue())
    {
        cout &lt;&lt; "Your Hand Beats Dealer's...You Win!! :D\n"

    }

    else if(Player.HandValue() &lt; Dealer.HandValue() &amp;&amp; Dealer.HandValue() &gt; 17 &amp;&amp; Player.HandValue() &gt; 17)
    {
        cout &lt;&lt; "Dealer's Hand Wins...Sorry :/\n"

    }
    cin.ignore(INT_MAX, '\n');

    cin.clear();
    cin.ignore(INT_MAX, '\n');
}
    break;
if(ans == 3)        // Stay
{

    Console::Clear();
    cout &lt;&lt; "Your Hand\n";
    cout &lt;&lt; "\nHand Value: " &lt;&lt; Player.HandValue() &lt;&lt; "\n";
    Player.Show();

    if(Player.HandValue() &gt; 21)
    {
        cout &lt;&lt; "You Busted man...Sorry :/\n"

    }
    else if(Player.HandValue() == 21)
    {
        cout &lt;&lt; "You've Won Your Freedom! :D\n";
        cout &lt;&lt; "\n\n";
        cout &lt;&lt; "Dealer's Hand\n";
        Dealer.Show();
    }
    while(Dealer.HandValue() &lt; 17)
    {
        Dealer.AddCard(Deck.Draw());
        Dealer.Show(1);

    if(Dealer.HandValue() &gt; 21)
    {
        cout &lt;&lt; "Dealer Busted man...You Win! :D\n"

    }
    else if(Dealer.HandValue() == 21)
    {
        cout &lt;&lt; "Dealer Wins...Your Soul! &gt;:D\n"

    }
    }
    if(Player.HandValue() &gt; Dealer.HandValue())
    {
        cout &lt;&lt; "Your Hand Beats Dealer's...You Win!! :D\n"

    }
    else if(Player.HandValue() &lt; Dealer.HandValue() &amp;&amp; Dealer.HandValue() &gt; 17 &amp;&amp; Player.HandValue() &gt; 17)
    {
        cout &lt;&lt; "Dealer's Hand Wins...Sorry :/\n;
        cin.ignore(INT_MAX, '\n');
    }
    cin.clear();
    cin.ignore(INT_MAX, '\n');
}

if(ans == 4)
{
    exit(0);
}
system("pause");
}
</code></pre>

<p>Don't mind the if(ans == 1), I'm saving that for my betting code. This code does what I need it to, for the most part. I don't have something to check for aces yet. We have a stack for the deck, which is what the Draw() and AddCard() are pulling from. Any help is much appreciated, and be gentle with the comments, I am new. :)</p>
