C++修改以下代码,实现赋值运算

重载赋值运算符“=”: 实现两个字符串的赋值运算。

#include <iostream>
using namespace std;
const int maxsize = 256;
class mystring
{
    char str[maxsize];
    int len;
public:
    mystring()
    {
        len = 0;
        str[0] = '\0';
        cout << "缺省构造函数" << endl;
    }
    mystring(char* s)
    {
        int i = 0;
        for (i = 0; s[i] != '\0'; i++)
        {
            str[i] = s[i];
        }
        len = i;
        cout << "构造函数(用C风格字符串初始化)" << endl;
    }
    mystring(mystring& ms)
    {
        len = ms.len;
        for (int i = 0; i < len; i++)
        {
            str[i] = ms.str[i];
        }
        cout << "拷贝构造函数" << endl;
    }
    ~mystring()
    {
        cout << "析构函数" << endl;
    }
    void show()
    {
        for (int i = 0; i < len; i++)
        {
            cout << str[i];
        }
        cout << '\n';
    }
};
int main()
{
    char str[21] = "Hello";
    mystring A(str);
    mystring B ="C++";
    mystring C;
    C = A;
    C.show();
    C = A + B;
    C.show();
    return 0;
}

赋值用默认赋值函数就行了,要重载的是加法运算