Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的应用程序中使用 Cling 作为嵌入式 c++ 解释器。目前它的设计目的是获取控制台输入并提供输出。如何更改它以嵌入 - 获取输入流并提供可在我的应用程序中使用的输出流?
[cling$] .help ... .> <filename> - Redirect command to a given file '>' or '1>' - Redirects the stdout stream only '2>' - Redirects the stderr stream only '&>' (or '2>&1') - Redirects both stdout and stderr '>>' - Appends to the given file
这就是重定向执行结果流的方式。