CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2001
    Location
    Irvine CA USA
    Posts
    88

    Adding a watch for a pointer (that points to an array)?

    I have a pointer (int*) that points to an array of elements.
    If i add the pointer to the watch window, as expected i only see the address of the beginning of the array. I seem to remember that there is a way to key the name in the watch window so it treats the pointer as an array and allows you to see all of indices. Anyone know how to do this?

    Tia
    Jeff

  2. #2
    Join Date
    Dec 2002
    Posts
    1,050
    for something like

    int* a = new int[10];

    Watch window format would be

    a,10 ( or any number of eles you want to see );

  3. #3
    Join Date
    Apr 2003
    Location
    HangZhou China
    Posts
    11

    visual c++?

    Yes, if you are using Visual c++
    int* a = new int[10];
    in "Watch" tool bar
    a,n (n is the number of of the first n element of array)
    a[n] (n is the index of array)
    enjoy it
    Leaning SDK and then any Rad tools

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured