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
792 B

  1. // wcout -- initialize standard wide 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 wfilebuf wfout(_cpp_stdout);
  10. _CRTIMP2 wostream wcout(&wfout);
  11. // INITIALIZATION CODE
  12. struct _Init_wcout
  13. { // ensures that wcout is initialized
  14. _Init_wcout()
  15. { // initialize wcout
  16. _Ptr_wcout = &wcout;
  17. if (_Ptr_wcin != 0)
  18. _Ptr_wcin->tie(_Ptr_wcout);
  19. if (_Ptr_wcerr != 0)
  20. _Ptr_wcerr->tie(_Ptr_wcout);
  21. if (_Ptr_wclog != 0)
  22. _Ptr_wclog->tie(_Ptr_wcout);
  23. }
  24. };
  25. static _Init_wcout init_wcout;
  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 */