S
sahm
i need help to use this function, but use an overloaded operator<<
instead....
ostream operator<<(ostream& out, vector<Card>& deck)
{
int i = 0;
for (int s = 1; s <= 4; s++)
{
for (int r = 1; r <= 13; r++, i++)
{
deck.setSuit(s);
deck.setRank(r);
deck.printCard();
cout << endl;
}
system("pause");
cout << endl;
system("pause");
//return out;
}
}
this works when i compiled it, but after the last set of cards are
printed on d screen, my program exits and there's debugger exception
modification on d screen...
instead....
ostream operator<<(ostream& out, vector<Card>& deck)
{
int i = 0;
for (int s = 1; s <= 4; s++)
{
for (int r = 1; r <= 13; r++, i++)
{
deck.setSuit(s);
deck.setRank(r);
deck.printCard();
cout << endl;
}
system("pause");
cout << endl;
system("pause");
//return out;
}
}
this works when i compiled it, but after the last set of cards are
printed on d screen, my program exits and there's debugger exception
modification on d screen...