how to display the middle card from the deck
Jul 28, 2017 at 9:15am
deck contains objects of type Card. i want to remove the middle card from the deck and display it.
1 2 3 4 5
|
vector<Card> deck;
Card middle = (Card) deck.erase(deck.begin() + deck.size() / 2);
|
Jul 28, 2017 at 10:39am
Have a look at the reference what erase actually returns.
Topic archived. No new replies allowed.