2

Possible Duplicate:
View array in Visual Studio debugger?

I declare an array of 50 elements using:

int *ans;
ans = new int[50];

yet when I'm looking at the 'Locals' list and try to expand the array, it have only one element, why's that? am I doing something wrong?

Community
  • 1
  • 1
Quaker
  • 1,483
  • 3
  • 20
  • 36

1 Answers1

4

The locals list just knows you have a pointer to an integer. It doesn't have a good way to know how big that array is, unfortunately. It could probably be made more sophisticated, or maybe you can create your own custom viewer for that variable - it depends on what IDE you're using probably.

Carl Norum
  • 219,201
  • 40
  • 422
  • 469