Use TRACE Macro in VC++ Non-MFC Project

The MFC TRACE macro can output string characters to the VS debug output window during Debug, which is very convenient to track variables during debugging;
this macro cannot be used if it is not an MFC project or ATL project;
additional windows are included in the project .h this header file, and then use the OutputDebugString() function to have the same effect as the TRACE() macro;

#include "stdafx.h"
#include <windows.h>

int _tmain(int argc, _TCHAR* argv[])
{
	//TRACE("dddddddd");
	OutputDebugString(_T("AAAAAADDDDDDebug!!!"));

	getchar();
	return 0;
}

 

Guess you like

Origin blog.csdn.net/bcbobo21cn/article/details/113707059
Recommended