首页 > 代码库 > c++ 重定位输出到DOS

c++ 重定位输出到DOS

#define USE_WIN32_CONSOLEint APIENTRY _tWinMain(HINSTANCE hInstance,                       HINSTANCE hPrevInstance,                       LPTSTR    lpCmdLine,                       int       nCmdShow){    UNREFERENCED_PARAMETER(hPrevInstance);    UNREFERENCED_PARAMETER(lpCmdLine);#ifdef USE_WIN32_CONSOLE	AllocConsole();	freopen("CONIN$", "r", stdin);	freopen("CONOUT$", "w", stdout);	freopen("CONOUT$", "w", stderr);#endif#ifdef USE_WIN32_CONSOLE	FreeConsole();#endif}

  

c++ 重定位输出到DOS