What does the pointer 'this+1' refer to in C++?

前端 未结 5 557
旧巷少年郎
旧巷少年郎 2021-02-03 18:51

I was wandering through the code of Sequitur G2P and found a really strange line of code:

public:
    ...
    const Node *childrenEnd() const { return (this+1)-&         


        
5条回答
  •  灰色年华
    2021-02-03 19:14

    Presumably this is part of an array, so this+1 would refer to the next object in that array.

提交回复
热议问题