fork(1) download
  1. #include <iostream>
  2.  
  3. class mystream : public std::ostream
  4. {
  5. public:
  6. mystream()
  7. {
  8. rdbuf( std::cout.rdbuf() );
  9. }
  10. };
  11.  
  12. int main() {
  13.  
  14. mystream m;
  15. m << "Hello\n";
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
Hello