Why do all the members of a class are initialized with the value 0 by default? Is it a feature of g++ or is it written in the language? I thought it was undefined (and often "random"). I have the same thing happening with a C program and remember it was not the case on some BSDs systems.
Name:
Anonymous2006-05-01 21:06
For security, an OS will never give you crap data. It'll be all initialized to 0; however don't count on it.
Name:
Anonymous2006-05-02 3:26
My g++ 4.0.2 on linux will show randomness when I just compiled and ran an int I created with no initial value.
Name:
Anonymous2006-05-02 4:19
>>1
It MAY initialize to 0, but is not guaranteed and should not be relied on.
Name:
Anonymous2006-05-02 7:34
I believe you can disable blanking in Windows NT for like 0.01% more performance (VROOM VROOOM!).