My compiler's throwing a fit because m_deck is an undeclared identifier. But I think I DID declare it: Please tell me what you think from the following snippets:
I have declared card data structures in a card.h header file.
I have declared a list of cards as a nonmember function in my deck.h header file.
Code:
typedef std::list<s_card> cardList_t;
and I have declared a cardList_t named m_deck in my game.h header file.
Then I use it in my game.cpp definition file.
Code:
void shuffleDeck()
{
cardNodeptr cur = head;
int x, y;
for(int count=1; count<=52; count++)
{
x = 1+rand()%52;
y = 1+rand()%52;
m_deck.insert(y,m_deck.retrieve(x));
m_deck.removeCard(x);
}
}
Thanks as always for your time!