I\'m working in Vs2010 c++ with 2D arrays. I started off with a 1D pointer and used the operation [] as the following:
class CMatrix
{
void clear();
public:
One way is to use use the Memory
viewer.
While debugging ( when stoped at a Breakpoint ), goto the menu Debug > Windows > Memory > Memory 1 to get the memory viewer. Then type-in the memory address ( copy paste the value from your pointer ) so that you can view the memory around that area of your program memory.
When you right click on memory viewer you can choose how you want to view the data ( as ANSI , as 4 integers, as 2 byte integers , as floats , bla bla... )
Also you can use the Watch
window at the debug time. just use your pointer as an array ( e.g. if your pointer is char * t
, the syntax t[0]
will give your data pointed by the pointer t