1.#pragma message
#define $str( L )#L
#define $mkstr( M, L )M(L)
#define $Line $mkstr( $str, __LINE__ )
#define message(x) message( __FILE__ "(" $Line ") : " x)
2.跟踪一个函数的调用地方
typedef int (*FP_printf)(const char*,...);
FP_printf Log(pcsz_t file,int line){
return printf;
}
#define printf (*Log(__FILE__,__LINE__))
3.purifyplus 调试.
linker reallocate table打开
CRT库最好用debug dll方式编译,便于检查错误
176万+

被折叠的 条评论
为什么被折叠?



