You can not reassign the ‘this’ pointer. This is because this pointer is rvalue when you try to point it to another object compiler gives you a warning and you will get this error “lvalue required as left operand of assignment”. The warning message could be different.
Answer:
You can not reassign the ‘this’ pointer. This is because this pointer is rvalue when you try to point it to another object compiler gives you a warning and you will get this error “lvalue required as left operand of assignment”. The warning message could be different.
need an explanation for this answer? contact us directly to get an explanation for this answer