关于赋值构造函数语法的困惑?this == &src
下面是类string的赋值构造函数:
String& operator=(const String& src) //赋值构造函数
{
if(this == &src)
return *this;
delete [] data;
data = new char[src.length+1];
strcpy(data,src.data);
return *this;
}
困惑:
1、this 是一个指针,&src表示什么? 不是表示src本身吗?src本身是地址?
2、*this 是类本身,return类本身,用&class 来接?
困惑,大家帮帮忙,如何理解