Thanks to Ben Voigt, I was able to cause the console to take input after I allocated it by doing:
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
This also directs the stdout and strerr to the same console window, in case they are directed someplace else for some reason.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…