小编mah*_*yar的帖子

令人困惑的C++代码涉及*this?

有人可以解释这段代码吗?我不明白第3行:

MyString MyString::operator+(const MyString &str)
{
    MyString ss(*this); //----> explain this part
    ss += str;
    return ss;
}
Run Code Online (Sandbox Code Playgroud)

谢谢!

c++ operator-overloading this

4
推荐指数
1
解决办法
216
查看次数

标签 统计

c++ ×1

operator-overloading ×1

this ×1