cpp_weekly
cpp_weekly copied to clipboard
How to properly capture stdout's output?
Channel
C++Weekly
Topics
How to properly capture stdout's output so it can be used for testing and other purposes.
Cover best practices and possibly the basics of std::ostream's API.
Length
Short form video (5 - 10 minutes).
This is very OS-specific, because random other components you link to may write to the process stdout/stderr themselves, bypassing whatever you do with the C or C++ standard library APIs. Therefore the best way is to capture it from another process, which is not a C++ topic.