i'm creating an array of a class object. The class in question has default values and takes two arguments, an in and a char array.
thats the class which creates an array of the class Cards.Code:class Deck { private: Cards deck[2]; public: Deck(); ~Deck(){}; }; Deck::Deck() { deck = {Cards(2,"2h"),Cards(3,"3h")}; }
However this is throwing up:
error C2059: syntax error : '{'
error C2143: syntax error : missing ';' before '{'
error C2143: syntax error : missing ';' before '}'
Is my syntax wrong somehow i can't see it?



LinkBack URL
About LinkBacks


