2007年11月9日 星期五

[C++] Offline debug information print 方便程式片段

in stdafx.h
-------------------------------------
#define
_ERRORFILE
-------------------------------------

in your code
--------------------------------------------------------------------------
#ifdef _ERRORFILE

FILE *f=fopen("c:\\message.txt","a+");
fprintf(f,"==> cnt = %d ::FillBuffer\n",cnt);
fclose(f);
#endif
--------------------------------------------------------------------------

沒有留言:

張貼留言