Why can't I add pointers?

前端 未结 7 892
终归单人心
终归单人心 2020-11-30 00:38

I have code very similiar to this:

LINT_rep::Iterator::difference_type LINT_rep::Iterator::operator+(const Iterator& right)const
{
    return (this + &am         


        
7条回答
  •  独厮守ぢ
    2020-11-30 01:37

    Subtracting two pointers gives you the distance between them. What would the result of adding two pointers be?

提交回复
热议问题