title: How to redirect cout to console in linux?
body: <p>I am writing a program which is a part of another program. In the main program, they redirect the default direction of <em>cout</em> to a LOG file. For debugging of my own programm, I need to redirect the output of <em>cout</em> to console (terminal) in linux. I cannot save the console <code>rdbuf</code> like the method described in the example at:</p>
  
  <p><a href="http://www.cplusplus.com/reference/iostream/ios/rdbuf/" rel="nofollow">http://www.cplusplus.com/reference/iostream/ios/rdbuf/</a></p>
  
  <p>Is there any way to get the handle to the console of linux in c++ for my purpose?</p>