Created
March 6, 2013 00:56
-
-
Save saga/5095841 to your computer and use it in GitHub Desktop.
log with C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//inline void _cdecl WriteLog(LPCTSTR lpszFormat, ...) | |
void WriteLog(LPCTSTR lpszFormat, ...) { | |
va_list args; va_start(args, lpszFormat); | |
int nBuf; TCHAR szBuffer[512]; | |
nBuf = _vstprintf(szBuffer, lpszFormat, args); _ASSERTE(nBuf < sizeof(szBuffer)); | |
OutputDebugString(szBuffer); | |
va_end(args); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment