天天看點

MFC界面程式 向控制台輸出調試資訊

//英文控制台輸出

AllocConsole(); //控制台調試視窗開啟

_cprintf(“this is end!”);

//FreeConsole();

//中文控制台輸出

AllocConsole();

FILE* m_new_stdout_file=NULL;

freopen_s(&m_new_stdout_file, “CONOUT$”, “w+t”, stdout);

cout << “>>>to MFC Debuge 好” << endl;

// fclose(m_new_stdout_file);

繼續閱讀