Why can't nullptr convert to int?

后端 未结 4 2116
不知归路
不知归路 2021-02-07 09:32

Summary: nullptr converts to bool, and bool converts to int, so why doesn\'t nullptr convert to int

4条回答
  •  醉梦人生
    2021-02-07 10:00

    To understand why is this happening, you should understand how to use nullptr. Check these links bellow:

    • http://en.wikipedia.org/wiki/C%2B%2B11
    • What exactly is nullptr?

    I hope it helps.

提交回复
热议问题