Article ID: 115347
Article Last Modified on 8/16/2005
APPLIES TO
- Microsoft Visual Workbench for Windows, when used with:
- Microsoft Visual C++ 1.0 Professional Edition
- Microsoft Visual C++ 5.0 Learning Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 4.0 Professional Edition
- Microsoft Visual C++ 5.0 Professional Edition
This article was previously published under Q115347
SYMPTOMS
On page 17 in chapter 2 of the C++ Tutorial included in Microsoft
C/C++, version 7.0 and Visual C++, version 1.0, it states:
"Constants declared with const have an advantage over those defined by
#define in that they are accessible to a symbolic debugger, making
debugging easier."
However, when global constants are used in a C++ program, they cannot
be watched in a local or watch window with CodeView or the Integrated
(IDE) Debugger in Visual C++.
RESOLUTION
The above behavior is by design in the products listed above. In these
versions, with the exception of CodeView 4.25 for Win32S, only local
constants are accessible to CodeView and the Visual C++ IDE debugger.
CAUSE
In Microsoft C++, storage of global constants is optimized for the
purpose of saving space, therefore no debug information is generated.
Additional query words: utilities
Keywords: kbbug kbide kbdebug kbprb KB115347