这个程序哪有错,求解答
#include<iostream>#include<string>
using namespace std;
int main()
{
int i,j;
string str[5]={"we","go","to","school","today"};
string t;
for(i=0;i<5;i++)
for(j=0;j<5-i;j++)
{
if(str[j]>str[j+1])
{
t=str[j];
str[j]=str[j+1];
str[j+1]=t;
}
}
for(i=0;i<5;i++)
cout<<str[i]<<" ";
cout<<endl;
return 0;
}