Debug Assertion Failed! Line: 52 Expression: _BLOCK_TYPE_IS_VALID (pHead-> nBlockUse)
#pragma once #ifndef _WARGAME_H #define _WARGAME_H #include "warplayer.h" #include "deck.h" #include <iostream> const int NUMPLAYERS = 2; //number of players in the game class WarGame { private: WarPlayer* arrPlayer[NUMPLAYERS]; //the array of players Deck *decks = new Deck(); public: WarGame(WarPlayer *name1, WarPlayer *name2); void printStatus(); WarGame(const WarGame& other); ~WarGame(); WarPlayer* startGame(int rounds); WarPlayer* tie(Card* c1, Card* c2); }; #endif // !_WARGAME__H WarGame::~WarGame() { arrPlayer[0]->~WarPlayer(); cout<< "\n" << endl; arrPlayer[1]->~WarPlayer(); cout<< "\n" << endl; delete[] arrPlayer[0]; //delete first player delete[] arrPlayer[1]; //delete second player }