Why is C++’s NULL typically an integer literal rather than a pointer like in C?
In C, a void* can be implicitly converted to any T*. As such, making NULL a void* is entirely appropriate. But that’s profoundly dangerous. So C++ did away with such conversions, requiring you to do most pointer casts manually. But that would create source-incompatibility with C; a valid C program that used NULL the way … Read more