您的位置:首页 > 编程语言 > C语言/C++

C++ 之独立编译打印输出

2017-06-13 18:29 260 查看
#include "stdafx.h"

#include <windows.h>

#include <cstring>

#include <stdarg.h>

void DbgPrintf_Mine(char *pszFormat, ...){

#ifdef _DEBUG

    char szbufFormat[0x1000];

    char szBufFormat_Game[0x1008] = "QGLog";

    va_list argList;

    va_start(argList, pszFormat);

    vsprintf(szbufFormat, pszFormat, argList);

    strcat(szBufFormat_Game, szbufFormat);

    OutputDebugStringA(szBufFormat_Game);

    va_end(argList);

#endif

}

int main(int argc, char* argv[])

{

    printf("Hello World!\n");

    DbgPrintf_Mine("%d,%d,%d", 1, 3, 5);

    return 0;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: