小弟刚开始学习C++,请问下面这个程序要实现字符串的升序排列,需要怎么改
#include <iostream.h>#include <string.h>
void main()
{
char * str[]={"Follow me","basic","great wall","department","computer"};
char * p;
int i,j;
for(i=0;i<5;i++)
for(j=i+1;j<5;j++)
{
if(strcmp(str[i],str[j]>0))
{ p=str[j];str[j]=str[i];str[i]=p;}
}
for(i=0;i<5;i++)
{cout<<str[i]<<endl;}
}