Is NULL the same as False in C++

前端 未结 4 871
你的背包
你的背包 2021-01-12 12:03

In C++ (gcc,VS) is NULL considered the same as False. Or more importantly if in a logical statement what does NULL evaluate to. There were a number of other questions but no

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-12 12:16

    NULL on gcc on some platforms (Mac) is much more complicated than that. It tries to start using the nullptr thingy from next cxx rev. Even so it should still evaluate to false in a boolean context

提交回复
热议问题