给点提示吧
#include<cstdlib>
<iostream> <ctime>
void shuffle(int[][13]);
voiddeal(const int[][13],const char *[],const char *[],int [][2]);
int main()
{const char *suit[]={"hearts","diamands","clubs","spades"};
const char *facd[]={"ace"..............."king"};
int deck[4][13]={0};//4花色,13面值
int hand[4][2]={0};//4个人,0代表花色,1为面值
srand(time(0));
shuffle(deck);
deal(deck,face,suit,hand);
return 0;
}
void shuffle(....)
for(int card=1;card<=52;card++)
do{row=rand%4;
colume=rand()%13;
}while(deck[row][colume]!=0);
deck[row][colume]=card;