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