Debug Assestion failure when using _setmode(_fileno(stdout), _O_U16TEXT);
I want to enable console to print Unicode Characters so i used _setmode(_fileno(stdout), _O_U16TEXT);
But once i do that an exception is thrown where this function is:
SetWindowsHookExW(WH_KEYBOARD_LL, hookproc_keyboard, NULL, 0);
"Unhandled exception at 0x00007FFEB1641208 (ucrtbase.dll) in testprogram.exe:
An invalid parameter was passed to a function that considers invalid parameters fatal."
and a window pops up showing this
"File: minkernel\crts\ucrt\src\appcrt\stdio\fputc.cpp
Line: 49
Expression: ( (_Stream.is_string_backed()) || (fn = _fileno(_Stream.public_stream()), ((_textmode_safe(fn) == __crt_lowio_text_mode::ansi) && !_tm_unicode_safe(fn))))
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts."
Can someone explain to me what this error is ?
Thanks in advance