Im trying to increase a dynamic array by 1 element and assign a integer variable to it but recieve
a heap overload error.
Any advice would be appreciated.
void CardSet::AddCard(int cardNum)
{
int* tmp;
nCards++;
tmp = new int[nCards];
for(int i = 0; i < (nCards - 1); i++)
{
tmp[i] = Card[i];
}
delete [] Card;
Card = tmp;
Card[nCards] = cardNum;
}