【求助】函数引用
#include "string.h"#include "stdio.h"
sort (char *a[],int n)
{ int i,j;
char *p;
for(i=0;i<=n-1;i++)
if(strcmp(a[i],a[i+1])>0)
{p=a[i];
a[i]=a[i+1];
a[i+1]=p;
}
}
main()
{ int i;
char *book []={"jhfgjhgj","hgffjn","tyui","dfgh","bnmvcx","lokjiuh"};
sort(book,6);
for(i=0;i<6;i++)
printf("%s\n",book[i]);
}
原功能为把字符串从小到大输出,没反应