I am working on a C++ program that can print output to more than one console. std::cout << value
sends the value to console 1 (standard output) and std::cout2 << value
sends the value to console 2. My OS is Linux and I am using Eclipse IDE.
This post and this show how this is down for a C++ application in Windows. How can I do this for my C++ code in Linux? I have a multi-threaded application, and I want each thread to print to its own console.
Clarification: Eclipse (like many other IDEs) has a console tab that shows you the standard output. Whatever you print to std::cout is shown in this console. I want to have a console2 tab so that I can selectively print to console
or console2
in my C++ program.