那个朋友还能帮我看看这段程序那里有问题的啊!
#include<iostream.h>
void swap(char& str1,char& str2)
{
char temp;
temp=str1;
str1=str2;
str2=temp;
}
void main()
{
char * ap="hello";
char * bp="how are you?";
cout<<"ap: "<<ap<<endl;
cout<<"bp: "<<bp<<endl;
swap(ap,bp);
cout<<"ap: "<<ap<<endl;
cout<<"bp: "<<bp<<endl;
}