Deck of Cards

I would like to create a deck of cards, however i'm getting a syntax error here:
deck[index] = Card(c,z); I'm not sure why.. Thanks


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
struct Card{
    public:
        enum suit {H,D,C,S};
        enum card {A,two,three,four,five,six,seven,eight,nine,ten,J,Q,K};
        Card(enum suit,enum card);
        Card();
};

Card::Card(){}
Card::Card(enum suit, enum card)
{

}
int main()
{
    srand(time(NULL));
    Card deck[52];
    int index=0;

    for(int z=0; z <4; z++)
    {
        for(int c=0; c <13; c++)
        {
           deck[index] = Card(c,z);
           index++;
        }
    }

return 0;
}
And the error is...?
invalid conversion from int to Card::Card
Topic archived. No new replies allowed.