C/C++ 调试之读取堆中的数组
以下是最近开发中调试时使用的一个头文件
#ifndef DEBUG_TOOLS_H
#define DEBUG_TOOLS_H
/**
* debug_tools.hpp: template class or functions used for debuging.
*/
/**
* StaticArray template type delcaretion:
* Before C++11, we need a template class to define a template type instead
* of using "typedef" keyword, for more information, see "typedef" in C++11.
* In C++11 or above, we can do it like this:
* // C++ code
* template<typename ElementType> using StaticArray = ElementType [100];
*/
template<class ElementType>
struct DbgHelper {
typedef ElementType StaticArray[100];
};
/**
* dbg_read_heap: