Open the program in the Windows program

xiaoxiao2021-03-06  84

/ / Open the console in the Windows program #include #include #include

Bool createconsole (void) {freeconsole (); if (allocconsole ()) {int hCRT = _open_OSFHANDE ((long) getstdhandle (std_output_handle), _o_text); * stdout = * (:: _ fdopen (HCRT, "W")); :: setvbuf (stdout, null, _ionbf, 0); * stderr = * (:: :: setvbuf (stderr, null, _ionbf, 0); return true;} return false; } Call this function when the program starts

转载请注明原文地址:https://www.9cbs.com/read-107063.html

New Post(0)