Hi everyone,
I am currently facing a problem with a program that I am writing. It is a computer simulation of the card game War. I am receiving this error
main.cpp:22: invalid conversion from `Card*' to `int'
main.cpp:22: initializing argument 1 of `Card::Card(int)'
Card is the name of one of my classes. Here is how I am using the constructor in my driver program:
Card deck[52]; //deck of cards - standard, no jokers
Queue p1, p2; // player1, player2
for (int i=0; i<52; ++i)
deck[i] = new Card[i];
Here is the constructor I am trying to invoke with above code:
Card::Card(int f)
{
face = f; // the value of the card (between 0&51)
}
Can anyone help me find the problem with this statement? Thank you for any help in advance.
Nick