본문 바로가기

02. 프로그래밍/C/C++

winapi 콘솔 띄우기

// 콘솔 할당
AllocConsole();

// 모드 설정
freopen( "CONOUT$",  "wt", stdout); // freopen(char* filename, char* mode, FILE* file)
// CONOUT$ - console out
// wt - write text
// stdout - standard output pointer

// ...

// 콘솔 해제
FreeConsole();