BOOL AllocConsole()              //申请控制台
freopen("CONOUT$", "w", stdout); //重定向输出流至控制台 [FILE *freopen(const char *path, const char *mode, FILE *stream);]
printf()                         //如果没有乱码的话可以使用WriteConsole();该API完整支持宽字符[wprintf()则支持很少]