Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.87 KB | None | 0 0
  1. #pragma once
  2.  
  3. // This is workaround of console unicode input/output from https://alfps.wordpress.com/2011/12/08/unicode-part-2-utf-8-stream-mode/
  4. // Magic for Windows. Do not touch!
  5.  
  6. #ifdef  _MSC_VER
  7. #   pragma warning( disable: 4373 )     // "Your override overrides"
  8. #endif
  9.  
  10. #include <algorithm>        // std::remove
  11. #include <stddef.h>         // ptrdiff_t
  12. #include <stdexcept>        // std::runtime_error, std::exception
  13. #include <stdlib.h>         // EXIT_SUCCESS, EXIT_FAILURE
  14. #include <iostream>         // std::wcout, std::wcerr, std::endl
  15. #include <streambuf>        // std::basic_streambuf
  16. #include <string>           // std::string, std::wstring
  17. using namespace std;
  18.  
  19. #include    <io.h>      // _setmode, _fileno
  20. #include    <fcntl.h>   // _O_U8TEXT
  21.  
  22. #undef      UNICODE
  23. #define     UNICODE
  24. #include <windows.h>    // ReadConsole
  25.  
  26. void FixIOStream();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement