Hello everyone, I can't seem to figure out how to see if two of my cards are equal to each other in the lab I'm writing. Here is my code that I have so far.
Why make a new thread? Anyway, your professor explicitly tells you in the assignment that equals takes another Card as a parameter. Just compare this->rank with the parameters.rank, and this->suit with the parameters.suit. If both match, the cards are equal.
If you were still wondering about your question in the other thread about(c : Card), the "c" is just a suggestion of what you should name the parameter, and "Card" is the type of the parameter, just like with setCard.
Ok, you need to pass a second card into equals as a parameter. The calling object gets passed in automatically, but you need another card to compare it to.