if your deck is type of Card then you can change your private member Card deck[] to Card *deck and write
Deck::Deck()
{
deck = new Card[52];
}
.....also you can't write Card deck[]; ....you must initialize it but as your array in class you can't do that...
Last edited on
kbw in this case destructor shouldn't be virtual but it doesn't prevent.......virtual destructor is used when there is inheritance among classes.....