?? stdafx.cpp
字號:
// stdafx.cpp : source file that includes just the standard includes
// speakerphone.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
void _debug(TCHAR *szFormat, ...)
{
TCHAR szBuffer[10240]; //in this buffer we form the message
const size_t NUMCHARS = sizeof(szBuffer) / sizeof(szBuffer[0]);
const int LASTCHAR = NUMCHARS - 1;
//format the input string
va_list pArgs;
va_start(pArgs, szFormat);
// use a bounded buffer size to prevent buffer overruns. Limit count to
// character size minus one to allow for a NULL terminating character.
_vsntprintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);
va_end(pArgs);
//ensure that the formatted string is NULL-terminated
SYSTEMTIME pSystemTime;
GetLocalTime( &pSystemTime );
//write the file
FILE *f = _tfopen(TEXT("\\dbg_msg.txt"),TEXT("a"));
_ftprintf(f, TEXT("[%2d:%2d:%2d] %s\n"),
pSystemTime.wHour,
pSystemTime.wMinute,
pSystemTime.wSecond,szBuffer);
fclose(f);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -