this funciton initialized as:
is it wrong if I call it this way?Code:void initCards(int *playerHand[], int *dealerHand[], int numOfCards)
Code:main() { int dealer[NUM_CARDS], player[NUM_CARDS]; // NUM_CARDS is defined as 21 int *dealerHand = &dealer[0]; int *playerHand = &player[0]; numOfCards = numOfDecks * 52; // numOfDecks is found earlier in main and // it's 2 in this case initCards(&playerHand, &dealerHand, numOfCards);
I'm getting a bus error right when this function is called. What is wrong? I debugged it with printf statements and right at the function call it returns a bus error.
in initCards() I have the first line being a printf statement and that's not showing... so the bus error come before anything inside iniCards() is done.



LinkBack URL
About LinkBacks



