S
stub
Some questions about "this" pointer:
1. To make an assignment function,
Stribg &String:perator=(const String &other)
{
...
return *this;
}
I have hard time to understand why "*this" matches a "String &" here. Could
someone shed some light on this?
2. In a static member function aren't there "this" pointer accessible inside
it?
3. In a const member function is the "this" pointer of const type while
non-const type in a non-const member?
Thanks in advance!
1. To make an assignment function,
Stribg &String:perator=(const String &other)
{
...
return *this;
}
I have hard time to understand why "*this" matches a "String &" here. Could
someone shed some light on this?
2. In a static member function aren't there "this" pointer accessible inside
it?
3. In a const member function is the "this" pointer of const type while
non-const type in a non-const member?
Thanks in advance!