添加如下代码:
AllocConsole();
freopen("CONIN$","rb",stdin);
freopen("CONOUT$","wb",stdout);
freopen("CONOUT$","wb",stderr);
setbuf(stderr, 0);
之后, 就可以使用cout << "Hello World" 这样的语句了, 很方便!
添加如下代码:
AllocConsole();
freopen("CONIN$","rb",stdin);
freopen("CONOUT$","wb",stdout);
freopen("CONOUT$","wb",stderr);
setbuf(stderr, 0);
之后, 就可以使用cout << "Hello World" 这样的语句了, 很方便!