best container class to store a deck of cards

what is the best container class to store a lists of cards for black jack;

is it a vector type class(I think this is the one that contains dynamic data thats easy to access)

or

a basic one just containing the 52 cards












Im a noob at using container classes
I'd recommend a vector. You're spot on. :)

-Albatross
I used a deque to store my cards in the players' hands and in the dealer's shoe.

I also made my card class compatible with an int -- you can convert a unique Card to and from a unique int. Hence, a deque <int> worked for me in the shoe, and a deque <Card> in the hand (for convenience).

In this case, a vector works as well as a deque.

Albatross +1
For me, I believe the choice of container depend on the operation I intend to act on it. If I have a lot of removal and addition then a list will be much better than a vector. But for a card of 52 cards where I do not forsee I need to remove and add cards to it often, a vector or deque will suffice.
Topic archived. No new replies allowed.