C++ freezes when runnging a program

Hello!

I just started using C++ 2008 Express Edition and I went into the "Learn C++" section to get started. There's a card game they teach you to create so I did all that, followed the code exactly but when I go to run the program, the whole thing just freezes (it says there are no errors or anything wrong with it). Please help!!

Thanks!

Rebecca
How large is the program? Since I don't see it I have no idea what might be wrong.
i will suggest you take a book and start learning and practicing..
there are some very good and easy books in market.. or you can download the ebooks also..

I've found Microsoft's learning tutorials/code samples very confusing and are for advance level mostly.. they tend to put everything in one program.. you wont learn from that waste time figuring out whats going on..
I added a "class" and called it Cardgame.h and typed in this code:

#pragma once
class Cardgame
{
int players;
static int totalparticipants;
public:
Cardgame(int p);
~Cardgame(void);
};

Then I made another section (whatever you call it) called Cardgame.cpp and added the code:

#include "Cardgame.h"
#include <iostream>
using namespace std;

Cardgame::Cardgame(int p)
{
players = p;
totalparticipants += p;
cout << p << " players have started a new game. There are now "
<< totalparticipants << " players in total." << endl;
}
Cardgame::~Cardgame(void)
{
}


Then the last on was called testgames.cpp and added the code:

#include "Cardgame.h"
int Cardgame::totalparticipants = 0;
int main()
{
Cardgame *bridge = 0;
Cardgame *blackjack = 0;
Cardgame *solitaire = 0;
Cardgame *poker = 0;

bridge = new Cardgame(4);
blackjack = new Cardgame(8);
solitaire = new Cardgame(1);
delete blackjack;
delete bridge;
poker = new Cardgame(5);
delete solitaire;
delete poker;

return 0;
}

Then I hit "build solution" and found there were no errors or warnings and such so I go to run the program and the whole C++ freezes :-(
Topic archived. No new replies allowed.