Sujet : Re: question about nullptr
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.lang.cDate : 08. Jul 2024, 20:28:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240708222804.00001654@yahoo.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
On Sun, 07 Jul 2024 15:17:34 -0700
Keith Thompson <Keith.S.Thompson+
u@gmail.com> wrote:
I just about always use NULL, not 0, when I want a null pointer
constant. Similarly, I use '\0', not 0, when I want a null character,
0.0 when I want a floating-point zero, and false when I want a Boolean
zero. I just like being explicit.
Pointer: I very rarely use NULL.
Character: I never use '\0'.
Floating point: I never use 0.0.
Boolean: I use false much more often than 0.