hi there i seem to have a problem setting my array of cards to null, well i think thats the problem
Code:
class deck {
public:
deck(); //Constructor
void createDeck();//Fills array with legal cards
void shuffle(); //Shuffles those cards
card drawCard(); //Gets a card from the deck
card* cards[52];
};
deck::deck() {
createDeck(); //Set up the deck
}
how would i set the array of cards to null?
maybe if i tell that when i run my program it crashes straight away but it does compile i can get more info if you need it but i wouldnt know what you need
thanks in advance
Code:
class card
{
public:
int value;
char suit;
};
this is my card class
my problem lies in that im trying to test my code by "cout<<" the deck out into a consol but it doesnt work it just crashes