What's the difference between a null pointer and a void pointer?

前端 未结 11 1613
甜味超标
甜味超标 2020-12-02 05:13

Whats the difference between a Null pointer & a Void pointer?

11条回答
  •  情歌与酒
    2020-12-02 05:56

    Void refers to the type. Basically the type of data that it points to is unknown.

    Null refers to the value. It's essentially a pointer to nothing, and is invalid to use.

提交回复
热议问题