字體:小 中 大 |
|
|
|
| 2015/11/25 17:40:36瀏覽926|回應0|推薦0 | |
![]() 建立 Debugging Window:
.
// 記得要 #include
.
// 建立一個新的 Console Window
AllocConsole();
.
// 將 stdin 、 stdout 、 stderr 弄到同一個 Console Window 中
freopen("conin$", "r", stdin);
freopen("conout$", "w", stdout);
freopen("conout$", "w", stderr);
.
// 這時候就可以透過剛剛建立的 Console Window 進行基本輸出 / 輸入操作
printf("This is a debugging window!!");
關閉 Debugging Window:
.
// 記得要 #include
.
// 將 stdin 、 stdout 、 stderr 關閉
fclose(stdin);
fclose(stdout);
fclose(stderr);
.
// 將原本自己 process 的 Console Window 關閉
FreeConsole();
|
|
| ( 興趣嗜好|其他 ) |












