Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- // This is workaround of console unicode input/output from https://alfps.wordpress.com/2011/12/08/unicode-part-2-utf-8-stream-mode/
- // Magic for Windows. Do not touch!
- #ifdef _MSC_VER
- # pragma warning( disable: 4373 ) // "Your override overrides"
- #endif
- #include <algorithm> // std::remove
- #include <stddef.h> // ptrdiff_t
- #include <stdexcept> // std::runtime_error, std::exception
- #include <stdlib.h> // EXIT_SUCCESS, EXIT_FAILURE
- #include <iostream> // std::wcout, std::wcerr, std::endl
- #include <streambuf> // std::basic_streambuf
- #include <string> // std::string, std::wstring
- using namespace std;
- #include <io.h> // _setmode, _fileno
- #include <fcntl.h> // _O_U8TEXT
- #undef UNICODE
- #define UNICODE
- #include <windows.h> // ReadConsole
- void FixIOStream();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement