新手求解释!!!不知道有什么问题,VC6.0运行失败
#include"stdio.h"#include"string.h"
#define M 5
int main(void)
{
char yl[M][30]={"dslgo","skf","skflto","sk","oipu"};
char *bx[M];
int sho,n;
char temp[30];
sho = 3;
for(n=0;n<M;++n)
{
bx[n] = yl[n];
if(strlen(bx[n])>strlen(bx[sho]))
{
strcpy(temp , bx[sho]);
strcpy(bx[sho] , bx[n]);
strcpy(bx[n] , temp);
}
}
for(n=0;n<M;++n)
{
printf("%s\n",bx[n]);
}
return 0;
}