0

Is there any easy way to view the full content of multidimensional arrays in VC++ 2010 in the debugger (or some other way I suppose)?

2
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by David321
0

No, it's being filled up at run time so (I think) I have to use the debugger.

0

I used its built-in debugger to do that. Compile the program in debug mode. But if you allocated the array with new or maloc() using pointers then vc++ 2010 can't display the contents like that (see code example below)

int main()
{
    int **ay = new int*[3];
    for(int i = 0; i < 3; i++)
    {
        ay[i] = new int[5];
        for(int j = 0; j < 5; j++)
            ay[i][j] = (i+1) * (j+1);
    }

    std::cin >> ay[0][0];
}
0

How did you get it to pop up? That's not in the debugging window...

0

Ok, forget the last comment. I got it to pop up in debug mode but I only have one one dimension showing

0

I'm going crazy here. Your code worked fine and it showed both dimensions in the debugger, but mine only shows one dimension as shown in the picture. Any thoughts?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.