2 u010785843 u010785843 于 2014.03.11 16:24 提问

洗牌问题,无法运行,求解原因

代码如下:
#include
#include
#include
#include

struct POKER
{
char suit[10];
char face[5];
};
typedef struct POKER Poker;

void main(void)
{
Poker card[52],temp;
int i,j;
char *Suit[] = {"Spades","Hearts","Clubs","Diamonds"};
char *Face[] = {"A","2","3","4","5","6","7","8","9","10","Jack","Queen","King"};

for(i=0;i<52;i++)
{
    strcpy(card[i].suit,Suit[i/13]);
    strcpy(card[i].face,Suit[i%13]);
}

srand(time(NULL));

for(i=0;i<52;i++)
{
    j = rand()%52;
    temp = card[i];
    card[i] = card[j];
    card[j] = temp;
}

printf("洗牌的结果如下:\n");
for(i=0;i<52;i++)
{
    printf("%10s%10s\n",card[i].suit,card[i].face);
}

}
我是在VC6.0下运行的,编译没有报错,但是不能运行,为什么呀?

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!