Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
765 B

  1. // cout -- initialize standard output stream
  2. #include <fstream>
  3. #include <iostream>
  4. #pragma warning(disable: 4074)
  5. #pragma init_seg(compiler)
  6. _STD_BEGIN
  7. // OBJECT DECLARATIONS
  8. static _Init_locks initlocks;
  9. static filebuf fout(_cpp_stdout);
  10. _CRTIMP2 ostream cout(&fout);
  11. // INITIALIZATION CODE
  12. struct _Init_cout
  13. { // ensures that cout is initialized
  14. _Init_cout()
  15. { // initialize cout
  16. _Ptr_cout = &cout;
  17. if (_Ptr_cin != 0)
  18. _Ptr_cin->tie(_Ptr_cout);
  19. if (_Ptr_cerr != 0)
  20. _Ptr_cerr->tie(_Ptr_cout);
  21. if (_Ptr_clog != 0)
  22. _Ptr_clog->tie(_Ptr_cout);
  23. }
  24. };
  25. static _Init_cout init_cout;
  26. _STD_END
  27. /*
  28. * Copyright (c) 1992-2001 by P.J. Plauger. ALL RIGHTS RESERVED.
  29. * Consult your license regarding permissions and restrictions.
  30. V3.10:0009 */