Darren New <dne### [at] san rr com> wrote:
> Actually, many times I've seen NULL defined as
> #define NULL ((void*)0)
> I'm not sure which (if either) such a thing would match in your C++ example.
The problem with that is that void* is not implicitly castable to any
other pointer type in C++ due to C++ having stricter implicit casting
rules than C.
You might try some clever tricks using templates and type conversion
operators, but then you will probably stumble accross problems with
method pointers and member variable pointers (which are one of the most
obscure features of C++).
'nullptr' will be a generic null pointer which is implicitly convertible
to any other pointer type.
--
- Warp
Post a reply to this message
|