What is the benefit of using a pointer C++

This question already has an answer here:

  • Why should I use a pointer rather than the object itself? 22 answers

  • There is no "simulation" happening at all. book1 has an address too, and the this pointer is set to the address of book1 when you do book1.setBooksId(123); . There is no difference.

    链接地址: http://www.djcxy.com/p/31640.html

    上一篇: 哪个更好:存储对象vs存储指针?

    下一篇: 使用指针C ++有什么好处