Hi ,
I want to make a cards that distribute cards for 4 players. deck[5][20] is arrays of stings that have the name of the cards.
the first card (from deck)goes to the first player, the second card (from deck) to the second player, the third card to the third player... until each player has 5 cards
this is my approach:
then I have to print each hand.Code:for(j=0;j<5;j++) { for(i=0;i<19;i=i+5) { hand1[j][20]=deck[i][20]; hand2[j][20]=deck[i+1][20]; hand3[j][20]=deck[i+2][20]; hand4[j][20]=deck[i+3][20]; } }
The code compiles well but it prints gibberish.
Please, do you know how to fix it?
thank you
B