void SetStr(string& s1, string& s2) { const char* s =(s1+s2).c_str(); cout<<s<<endl; }
void SetStr(string& s1, string& s2) { cout<<(s1+s2).c_str()<<endl; }
s1+s2
s3
string st3 = s1+ s2; const char* ch = st3.c_str(); cout<<ch;
cout<<s1+s2
s1.append(s2); cout << s1 <<endl;
void SetStr(string& s1, string& s2) { const char *s; strcpy(s,(s1+s2).c_str()); cout<<s<<endl; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)