Why should we use nullptr instead of NULL or 0?
Apr 21, 2025 · 1 min read · In modern C++, using nullptr is preferred over NULL or 0 when dealing with pointers. Here’s why: The type of nullptr is std::nullptr_t. std::nullptr_t can be implicitly converted to any pointer type, but not to an integer. Because of this, nullptr...
Join discussion