Changing what THIS is
问题 Is there a way to change what THIS point to? class foo{...} foo* fooinstance = new foo(); foo* otherfooinstance = new foo(); void foo::bar(){ this = otherfooinstance; } fooinstance->bar(); for those of you who are wondering in what case I would change the this pointer here is case. I had to do a tree recursion where I had to remove intermediate nodes.. for this example lets assume the intermediate nodes of removal have the title d. and these intermediate nodes only have one child. So in lisp