Where do you declare deck? It should look like this:
Code:
Deck* deck = NULL;
not like this:
Code:
Deck* deck;
Otherwise deck will have some garbage value in it, and when you try to delete that address -- BOOM!