Tip: Listing elements of a pointer on Watch Window

C, C++, Visual C++, C++.Net Topics
Post Reply
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Tip: Listing elements of a pointer on Watch Window

Post by Neo » Thu Sep 17, 2009 8:15 pm

I was looking for a solution for this. I used to print the values to screen earlier.
However we can easily get this done on Watch Window.

Add number of elements as ",N" to the end of pointer on Watch Window.

For example, if you want 10 elements to be listed in pointer pnt, you will need to have "pnt, 10" (without quotes) on Watch Window.
Post Reply

Return to “C/C++ Programming”