|
![](/i/fill.gif) |
Le_Forgeron wrote:
> Well, it will be portable. memset() will work.
> But if later you expect to check the pointer against NULL, you will be disappointed.
Well, yes, that's what I was asking.
> In C++, you could make a class for your structure, and have a nice constructor to
set
> NULL in y; But that might somehow conflict with the usage of the union...
The union was just an unambiguous demonstration of what I meant by "the bit
pattern of a NULL pointer in memory." It's not actual code.
> Mixing a value and a pointer is a non-sense, unless you provide a real & sensible
usage.
memset() was more what I was talking about, which clearly mixes pointers and
values if you apply it to a structure with pointers in it.
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
![](/i/fill.gif) |