-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jérôme M. Berger wrote: > > That depends. In C/C++, the default value for any global variable > is to have all bits set to 0 whatever that means for the actual data > type.
No it's not, it's always uninitialized. Visual studio will initialise memory & a functions stack segment with 0xcd, but only in debug builds. In release mode you get what was already there. That used to be the case with gcc (which used 0xdeadbeef) as well unless they've changed it. - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFL7qNxT9LetA9XoXwRAnApAJ9rSzMN9dy1mxMFdBzASaESlkpvCQCfTRWO GlaukVSRKe3prjs/jXe73CU= =tgCi -----END PGP SIGNATURE-----