|
![](/i/fill.gif) |
Darren New wrote:
>> You are accessing a public variable, not a private one.
>
> Nope. Read it again. What exactly gets set to 27? Do you think there's
> a good chance it might by y?
Or, to phrase it differently, do you know of any C++ compiler that won't
clobber y with that code? Given that the layout of the class is required to
match the layout of the corresponding C structure (no virtual methods),
the only real choices would see "clobber y", "dump core", or "do something
completely unrelated to the C++ memory model."
... just to clarify. :-)
--
Darren New, San Diego CA, USA (PST)
My fortune cookie said, "You will soon be
unable to read this, even at arm's length."
Post a reply to this message
|
![](/i/fill.gif) |