Placing a class object inside a vector?

前端 未结 4 1825
情歌与酒
情歌与酒 2021-01-28 23:43

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         


        
4条回答
  •  孤城傲影
    2021-01-29 00:18

    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::Cards;
    

提交回复
热议问题