|
![](/i/fill.gif) |
Mueen Nawaz wrote:
> Yes, I seem to recall that it's true for static variables as well
> (in C++ - not sure about C).
I hedged my bets, not knowing whether statically allocated instances of
a class with a constructor invoked the constructor. I'm pretty sure it
does, but I didn't feel like trying to google it up. :-) Maybe it
initializes to zero everything before it invokes the constructor or
something. (Which I would suspect, given that it's often the OS that
does that initialization as it allocates the pages.)
--
Darren New / San Diego, CA, USA (PST)
Post a reply to this message
|
![](/i/fill.gif) |