DOCUMENT:Q198953 07-MAY-2001 [visualc] TITLE :HOWTO: Expand An Array Pointer in the Visual C++ Debugger PRODUCT :Microsoft C Compiler PROD/VER:winnt:6.0 OPER/SYS: KEYWORDS:kbDebug kbide kbVC600 ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual C++, 32-bit Enterprise Edition, version 6.0 - Microsoft Visual C++, 32-bit Professional Edition, version 6.0 - Microsoft Visual C++, 32-bit Learning Edition, version 6.0 ------------------------------------------------------------------------------- SUMMARY ======= Starting with Visual C++ version 6.0, it is now possible to expand an array pointer to view all array elements in the Visual C++ Debugger Watch window. This feature is not documented. In the Watch window, type an expression that evaluates to a pointer followed by a comma and the number of elements in the array. MORE INFORMATION ================ 1. Build the debug version of the following code as a console application. // Filename main.cpp // No compile option needed #include void main(void) { int * p; char* ptr = "Hello World"; p = new int [10]; for(int i=0; i<=9; i++){*(p+i) = i+1;} cout << i <