//Ex6_18.cpp
#include "iostream" 
#include "cstring"
using namespace std;
class Str 
{private: 
    char *s; 
    int len; 
 public: 
    Str(){}   //不可缺少，为创建对象s3提供 
    Str(char *s1) 
	{len=strlen(s1); 
     s=new char[len]; 
     strcpy(s,s1);} 
    void show() 
	{cout<<s<<endl;} 
    Str operator+(Str s1)    //对加法运算符进行重载 
	{return(strcat(s,s1.s));}    //返回连接后的串对象
}; 
void main() 
{char str1[20],str2[10]; 
 gets(str1); gets(str2); 
 Str s1(str1),s2(str2),s3; 
 s3=s1+s2; 
 s3.show(); 
}
