Pure virtual functions in C++11

前端 未结 8 2237
太阳男子
太阳男子 2020-12-29 18:46

In C++98, the null pointer was represented by the literal 0 (or in fact any constant expression whose value was zero). In C++11, we prefer nullptr

8条回答
  •  孤独总比滥情好
    2020-12-29 19:21

    That doesn't mean it is a pointer, or that it has to be equal to nullptr.

    = 0 is sufficient and means that the virtual function is to be pure.

提交回复
热议问题