程序编译不了 找不出错误呀
不知道为什么程序编译了出现这么多错误呢#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
string a,s1="hello ";
string s2="123";
a=s1; //复制
cout<<(a==s1?"":" not")<<"equal\n"; //比较
cout<<a+s2<<endl; //连接
reverse(a.begin(),a.end()); //倒置串
cout<<a<<endl;
cout<<a.replace(0,9,9,'c')<<endl; //设置
cout<<(s1.find("ell")!=-1?"":"not ")<<"found\n"; //查找串
cout<<(s1.find('c')!=-1?"":"not ")<<"found\n"; //查找字符
}