如何把std::cout标准输出重定向到vs2019的输出窗口中

代码

#include 
#include 
#include 
#include 
#include 
#include

int pipeHandles[2];
const int kBufferSize = 4096;
void ReadFunc(int readhandle)
{
   
    char buf[kBufferSize];
    int readBtyes;
    do {
   
        readBtyes = ::_read(readhandle, buf, kBufferSize);        
        buf[readBtyes] = 0;
        ::OutputDebugStringA(buf

你可能感兴趣的:(c/c++)