有关qsort()的用法
#include <stdio.h>void main ()
{
int a[5] = {1,0,-7,8,2};
int i;
int cmp (int *a, int *b);
qsort (a,5,sizeof(int),cmp);
for (i=0; i<5; i++)
printf ("%3d",a[i]);
}
int cmp (int *a, int *b)
{
return *(int *)a - *(int *)b;
}
VC6上为什么不能运行呢?