I\'m trying to make a simple blackjack program. Sadly, I\'m having problems right off the bat with generating a deck of cards.
#include
#inc
As mentioned by others, you can use 'T' for ten, J, Q, and K for the figures. As far as push_back.. since deck is a vector of chars, you can pass only one char to push_back as argument. Passing both the card value (1...9, T, J, Q, K) and its suite doesn't work.
I personally would create a little struct, to represent a Card, with a Value and a Suite property. Then, you can make your deck a vector of Cards .
Edited: fixing last word since vector (less-than) Card (greater-than) was rendered as vector (nothing).