赋值运算符的重载:
赋值运算符 ‘=’ 重载 赋值运算符 两边的类型 可以 不匹配
把一个 int类型变量 赋值给一个 Complex对象
把一个 char * 类型的字符串 赋值给一个 字符串对象 需要 重载赋值运算符 ‘=’ 赋值运算符 “=” 只能重载为 成员函数。
特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.