c++ _popen读取管道内容(输出内容)例子
FILE * pPipe = _popen(_postExEPath.toStdString().c_str(), "rb");
QString strData;
if (pPipe)
{
while (!feof(pPipe))
{
std::string tempStr(1024, '\0');
fgets((char *)tempStr.c_str(), 1024, pPipe);
strData.append(QString::fromLocal8Bit(tempStr.c_str()));
}
fclose(pPipe);
}