I have been trying to invoke the default destructor for a class of mine (see below). when I try I get this error:
"no match for 'operator~' in '~Card(((const Card&)((const Card*)(& hearts[1]))))'"
class Card
{
public:
bool inPlayer;
bool inDeck;
bool inOpp;//in opponets hand.
int type; //!< Member variable "type" (1-Ace(A))
string suit; //!< Member variable "suit" (Heart,Diamond,Spade,Club)
void present()//!< says the type of card you have.
{
cout << type << "of " << suit << "'s";
}
};
This is where I am using the class and its destructor. The instance is in an array
~Card(hearts[1]);//I am not sure if this is even right
I want to use the default destructor for this class, it has no need to have a special destructor... or at least I don't think so.
I am trying to make a command line card game.