Sujet : Re: question about nullptr
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 09. Jul 2024, 05:01:44
Autres entêtes
Organisation : None to speak of
Message-ID : <8734ojxlg7.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Gnus/5.13 (Gnus v5.13)
Tim Rentsch <
tr.17687@z991.linuxsc.com> writes:
[...]
This posting has inspired me to try using (long)0.0
whenever a null pointer constant is needed. As for
example
>
(void*){ (long)0.0 }
>
as an argument to a variadic function where a pointer
is expected.
But surely ((void*)('/'/'/'-'/'/'/')) is more elegant.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */