There's requirement on my assignment that says: The class needs a helper function to be called by outstream operator function. What does it mean by this? I have the following code.
ostream & operator<<(ostream & out, Card aCard)
{
switch (int rank = aCard.getRank())
{
case 14: out << "A"; break;
case 10: out << "T";
case 11: out << "J"; break;
case 12: out << "Q"; break;
case 13: out << "K"; break;
default: out << rank;
}
switch (suits suit = aCard.getSuit())
{
case diamond: out << "D"; break;
case spade: out << "S"; break;
case heart: out << "H"; break;
case club: out << "C"; break;
}
return out;
}