3
Я использую процесс boost и использую код по умолчанию в main tutorials page.выход с библиотекой ускорения процесса в C++
Я запустил этот код и не распечатывал какой-либо выход!
#include <boost/process.hpp>
#include <string>
#include <vector>
#include <iostream>
namespace bp = ::boost::process;
int main()
{
std::string exec = "bjam";
std::vector<std::string> args;
args.push_back("--version");
bp::context ctx;
ctx.stdout_behavior = bp::capture_stream();
bp::child c = launch(exec, args, ctx);
bp::pistream &is = c.get_stdout();
std::string line;
while (std::getline(is, line))
std::cout << line << std::endl;
}
Может ли кто-нибудь помочь мне с этой проблемой?
этот код выход here.
Спасибо!