why it is impossible to allocate memory into “this” in c++?

后端 未结 0 430
Happy的楠姐
Happy的楠姐 2020-12-29 15:53

this = new BSNode(value); // it works.

*this = BSNode(value); // it doesn\'t work.

Error: assignment to \'this\'(anachronism).

what is the difference?

相关标签:
回答
  • 消灭零回复
提交回复
热议问题