  | 
   Viewing Dynamically Allocated Arrays In VC++ 
   Submitted by  |   
  
  
Normally when you allocate an array using new or malloc in VC++ when you
look at the variable in the watch window you can only see the first
element.  To view the entire array just type the <variable-name>,
<number-of-elements-to-view>.
  Example:
 
 void main( void )
{
	const int SIZE = 10;
	int *intArray = 0;
  	intArray = (int *)malloc( sizeof( int ) * SIZE ) ;
  	for( int x = 0; x < SIZE; x++ )
	{
		intArray[x] = 10 + x;	
	}
}  |  
  
 
  to see intArray in the watch window type
  intArray, SIZE
  and it will expand out for the entire array
  
 | 
 
 
 
The zip file viewer built into the Developer Toolbox made use
of the zlib library, as well as the zlibdll source additions.
 
 
 |