VC++ Debug显示指针所指的array内容

  If you expand a pointer and you only get a single item, just add ",n" to the entry in the watch window where n is the number of elements to expand.   

  For example, if you have a foo * pFoo pointing to an array of ten elements, put pFoo,10 in your watch window to see all of the element.

  This can be useful to view parts of a large array.

  If pFoo points to an array of 5,000 elements, you might use (pFoo + 2000),10 to see elements 2000 through 2009.

       总结:

  1、watch a particular range of <count> elements starting at the <offset> position (of course, array here is your actual object)

  (array + <offset>), <count>

  2、watch the entire array

  array, <count>

  示例:

  

  If you work with MFC and use the "array" containers from it, like CArray, CDWordArray, CStringArray, etc., you can of course apply the same filtering, except that you must watch the m_pData member of the array, which is the actual buffer holding the data.

  

 

posted on 2018-02-11 17:32  我来乔23  阅读(299)  评论(0编辑  收藏  举报

导航