Tagged articles
2 articles
Page 1 of 1
Deepin Linux
Deepin Linux
May 22, 2026 · Fundamentals

What is nullptr and why should it replace NULL in modern C++?

The article explains that NULL is a macro equal to integer 0, which can cause type‑mixing errors in overload resolution and template deduction, while the C++11 keyword nullptr has its own std::nullptr_t type, providing strict pointer semantics, eliminating overload ambiguities, improving safety, readability, and integration with modern C++ features.

CNULLfunction overload
0 likes · 24 min read
What is nullptr and why should it replace NULL in modern C++?