C
Chris Stankevitz
Hi,
MSVC 7.1 .net 2003, native c++. I received this runtime message today for
the first time in my life (and I've used MSVC for a long time):
Run-Time Check Failure #3 - The variable 'doCancel' is being used without
being defined.
The word "defined" should say "initialized". The code that triggered it
looked a little like this:
bool doCancel; // uninitialized
if(doCancel) // use of uninitialized
...
My question:
I've used hundreds of uninitialized variables in the past few years. Most
of them I found only while searching for strange runtime behavior. How come
MSVC never popped up this very helpful warning before?
I run debug all the time, so the answer is not "because I've always run in
release mode."
Thanks,
Chris
MSVC 7.1 .net 2003, native c++. I received this runtime message today for
the first time in my life (and I've used MSVC for a long time):
Run-Time Check Failure #3 - The variable 'doCancel' is being used without
being defined.
The word "defined" should say "initialized". The code that triggered it
looked a little like this:
bool doCancel; // uninitialized
if(doCancel) // use of uninitialized
...
My question:
I've used hundreds of uninitialized variables in the past few years. Most
of them I found only while searching for strange runtime behavior. How come
MSVC never popped up this very helpful warning before?
I run debug all the time, so the answer is not "because I've always run in
release mode."
Thanks,
Chris