I'm trying to make a deck of cards; I want it to keep track of the cards that have been drawn. Will this code delete the card that is displayed?
void Deck::draw_card()
{
int random_card = (rand() % cards.size()) - 1;
cout << "\n" << cards[random_card].name << "\n";
cards.erase(cards.begin() + random_card);
}