Reputation: 17
Is NULL
fully interchangeable with nullptr
in C23? Are they used in separate scenarios?
I'm coding a game, and there are moments where I've used NULL
and others where I've used nullptr
. I initially started with a C99 approach, but after seeing all the new features of C23, I decided to switch. However, some parts of my code still use the old NULL
, and I've been wondering if there might be any issues replacing it with the new nullptr
to avoid memory leaks or other problems.
I asked chatgpt about it but it still keeps thinking nullptr
is only C++ stuff.
Upvotes: 0
Views: 156