1
Answer

overloading the this operator?

john smith

john smith

14y
1.9k
1
Can the 'this' operator be overloaded? I'd like to overload it somehow so that it was no longer read only but don't really know anything about operator overloading.

Thanks.
Answers (1)
0
Kirtan Patel

Kirtan Patel

NA 35k 2.8m 14y
'this' is Pointer not operator ..

by operator overloading mechanism you can overload operators only not the pointers



Here is list of operator that is over loadable ...

+ - * / % ^ & | ~
! , = < > <= >= ++ --
<< >> == != && || += -= /=
%= ^= &= |= *= <<= >>= [] ()
-> ->* new new[] delete delete[]