I noticed that I can place a Class inside a vector; here is my program, where I am receiving the following error:
/out:blackjack.exe
blackjack.obj
blackjack.obj
You'll have to instantiate the vector somewhere as it's a static. Basically, you want something like:
std::vector<Card> Card::Cards;
somewhere in your code.
Your cards vector is defined as static. That means it is effectively a global variable that you must define. This can be done by putting the following after the class definition of Card
:
std::vector<Card> Card::Cards();
You are declaring the static member Cards
inside the class definition, but you aren't defining it anywhere. Add a definition after the class definition:
vector<Card> Card::Cards;
You have to actually declare your vector.