Code:
deck = {Cards(2,"2h"),Cards(3,"3h")};
This line is throwing up the errors.
Code:
class Cards
{
private: char name_of_card [5];
// Value represents the value of the card, 1 being ace 2 - 10 numbers 11 jack , 12 queen , 13 king unlucky for some
int value;
public:
Cards(int v, char c []);
~Cards(){};
char *get_name();
int get_value();
};
Cards::Cards(int v = 2, char c [5] = "2H")
{
value = v;
strcpy(name_of_card , c);
}
char * Cards::get_name()
{
return name_of_card;
}
int Cards::get_value()
{
return value;
}
thats the card class
figured it would be easier to dechyper why that line is giving errors. Its an array of type class