Using STDIN with an AllocConsole()

前端 未结 4 1834
北荒
北荒 2021-01-05 06:00

I have a third-party dll that I load into software that isn\'t mine, and I\'m using AllocConsole() to create the standard windows CLI window so I have an easy means of outpu

4条回答
  •  醉梦人生
    2021-01-05 06:39

    This is what I use.

        FILE *file = nullptr;
    freopen_s(&file,"CONIN$", "r", stdin);
    freopen_s(&file, "CONOUT$", "w", stdout);
    

    Just hopes this helps someone.

提交回复
热议问题