帮忙修改一下C++程序
#include<iostream.h>#include<string.h>
class jia
{
public:
jia(char stl[5]);
jia operator+(jia );
void show();
private:
char str[5];
};
jia::jia(char stl[5])
{
strcpy(str,stl);
}
jia jia::operator+(jia)
{
jia A,B;
return strcat(A.str,B.str);
}
void jia::show()
{
cout<<str<<endl;
}
void main()
{
jia A="abcd";
jia B="efgh";
A.show();
B.show();
(A+B).show();
}