not init vars to zero?
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
Is there any option to not have the compiler initialize variables to zero in debug builds? (I'm using VC++ 6) - thanks
-
Is there any option to not have the compiler initialize variables to zero in debug builds? (I'm using VC++ 6) - thanks
Global variables are always zero initialised. As someone else mentioned, local variables are initialised to 0xCCCCCCCC in debug builds but left as is in release builds. Look into the
/GZ
compiler switch. Removing it stops locals from being initialised with 0xCCCCCCCC. I use MSVC6 so you might want to check that nothing has changes if you use a later version. Steve