Yes. In C ++, nullptr is the equivalent of null in Java, C #, and many other languages. Prior to C ++ 11, it was standard to use null (which was a macro defined as 0); however, nullptr actually guarantees that it can only be used in the context of pointers (whereas null , since it is defined as 0, can also be used as a return value for a function that returns an int instead of a pointer that is incompatible), although both nullptr and null implicitly converted to bool .
source share