VC打印调试信息

#include <windows.h>
#include <stdio.h>

#ifndef _UTIL_H_
#define _UTIL_H_

/*向VS的调试窗口打印调试信息*/
void OutputDebug( const char * lpszFormat, ... )
{
#ifdef _DEBUG

	char chInput[512] = {0};
	va_list argList;

	va_start( argList, lpszFormat );
	vsprintf( chInput, lpszFormat, argList );
	va_end(argList);
	OutputDebugStringA( chInput );
	OutputDebugStringA( "\n" );

#endif
}

#endif

  

posted @ 2014-06-05 17:22  庚武  Views(486)  Comments(0)    收藏  举报