how to display the middle card from the deck


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);

Have a look at the reference what erase actually returns.
Topic archived. No new replies allowed.