高手请分析为什么出错
#include<iostream>
#include<string>
using namespace std;
int main()
{
string swap(string&,string&);
cout<<"pls input the two string to be swapped"<<endl;
string s1,s2;
cin>>s1>>s2;
cout<<endl;
swap(s1,s2);
cout<<"after swapping,s1 is:"<<s1<<"\ns2 is :"<<s2<<endl;
system("pause");
}
string swap(string &x,string &y)
{
string temp;
temp=x;
x=y;
y=temp;
// return;
}