main.cpp:63:29: error: request for member ‘setDeck’ in ‘deck’, which is of non-class type ‘main(int, const char**)::cardDeckType’
deck. setDeck(normal);
^~~~~~~
main.cpp:64:28: error: request for member ‘shuffle’ in ‘deck’, which is of non-class type ‘main(int, const char**)::cardDeckType’
deck.shuffle();
^~~~~~~
this is my error. I don't know however I fix it tho.. It is still there.
here is my coding...
switch (yourSelection)
{
case 1:
{
deck.setDeck(normal);
deck.shuffle();
break;
}
case 2:
{
deck.setDeck(duplicate);
break;
}
case 3:
{
deck.setDeck(tie0);
break;
}
case 4:
{
deck.setDeck(tie3);
break;
}
case 5:
{
deck.setDeck(tie33);
break;
}
case 6:
{
deck.setDeck(tie_other);
break;
}
case 7:
{
deck.setDeck(P1_win);
break;
}
case 8:
{
deck.setDeck(P2_win);
break;
}
error: request for member ‘setDeck’ in ‘deck’, which is of non-class type ‘main(int, const char**)::cardDeckType’
Compiler says:
1. You have variable named deck
2. The type of deck is main(int, constchar**)::cardDeckType
3. That type is not a class
4. You try to do something that looks like a call of member function on the deck
5. Type of deck does not have member functions. ERROR
The type that compiler sees is probably true, but not obvious to you/us. Declaration of variable deck might be more explanatory than the compiler message. Definition of the type used in the declaration will reveal more.