Click here to Skip to main content
15,904,348 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SOLVED Re: Loop thru two dimensional array - edited Pin
Salvatore Terress16-Jan-24 7:20
Salvatore Terress16-Jan-24 7:20 
QuestionAdding "checkable " in Qt QMenu / QAction using C++ partially fails Pin
Salvatore Terress13-Jan-24 16:29
Salvatore Terress13-Jan-24 16:29 
AnswerRe: Adding "checkable " in Qt QMenu / QAction using C++ partially fails Pin
Richard MacCutchan13-Jan-24 21:09
mveRichard MacCutchan13-Jan-24 21:09 
AnswerRe: Adding "checkable " in Qt QMenu / QAction using C++ partially fails Pin
Dave Kreskowiak14-Jan-24 6:06
mveDave Kreskowiak14-Jan-24 6:06 
AnswerRe: Adding "checkable " in Qt QMenu / QAction using C++ partially fails Pin
jschell15-Jan-24 4:00
jschell15-Jan-24 4:00 
GeneralRe: Adding "checkable " in Qt QMenu / QAction using C++ partially fails Pin
Salvatore Terress15-Jan-24 7:06
Salvatore Terress15-Jan-24 7:06 
Questionmemory allocation failure Pin
mike741111-Jan-24 1:28
mike741111-Jan-24 1:28 
AnswerRe: memory allocation failure Pin
Mircea Neacsu11-Jan-24 1:37
Mircea Neacsu11-Jan-24 1:37 
GeneralRe: memory allocation failure Pin
mike741111-Jan-24 3:28
mike741111-Jan-24 3:28 
GeneralRe: memory allocation failure Pin
Richard MacCutchan11-Jan-24 3:35
mveRichard MacCutchan11-Jan-24 3:35 
GeneralRe: memory allocation failure Pin
Mircea Neacsu11-Jan-24 3:40
Mircea Neacsu11-Jan-24 3:40 
AnswerRe: memory allocation failure Pin
CPallini11-Jan-24 1:38
mveCPallini11-Jan-24 1:38 
QuestionHow to read a specified amount bytes from a binary-file with a offset (C++) Pin
P. Mehroof Abid7-Jan-24 3:24
P. Mehroof Abid7-Jan-24 3:24 
AnswerRe: How to read a specified amount bytes from a binary-file with a offset (C++) PinPopular
Mircea Neacsu7-Jan-24 4:13
Mircea Neacsu7-Jan-24 4:13 
GeneralRe: How to read a specified amount bytes from a binary-file with a offset (C++) Pin
Daniel Pfeffer8-Jan-24 9:28
professionalDaniel Pfeffer8-Jan-24 9:28 
Questioncatching a divide-by-zero error Pin
mike74115-Jan-24 6:52
mike74115-Jan-24 6:52 
AnswerRe: catching a divide-by-zero error Pin
Maximilien5-Jan-24 6:54
Maximilien5-Jan-24 6:54 
AnswerRe: catching a divide-by-zero error Pin
jeron15-Jan-24 7:00
jeron15-Jan-24 7:00 
AnswerRe: catching a divide-by-zero error Pin
Greg Utas7-Jan-24 5:45
professionalGreg Utas7-Jan-24 5:45 
AnswerRe: catching a divide-by-zero error Pin
jschell8-Jan-24 5:51
jschell8-Jan-24 5:51 
AnswerRe: catching a divide-by-zero error Pin
Daniel Pfeffer8-Jan-24 9:33
professionalDaniel Pfeffer8-Jan-24 9:33 
Question!file trickiness Pin
mike74114-Jan-24 1:45
mike74114-Jan-24 1:45 
AnswerRe: !file trickiness Pin
Maximilien4-Jan-24 2:12
Maximilien4-Jan-24 2:12 
GeneralRe: !file trickiness Pin
mike74114-Jan-24 2:41
mike74114-Jan-24 2:41 
Questionoutputting Δέλτα Pin
mike74112-Jan-24 16:34
mike74112-Jan-24 16:34 
I wrote the following code to output the Greek word "Δέλτα":


C++
#include <iostream>
#include <io.h>
#include <fcntl.h>
using namespace std;

int main() {
    _setmode(_fileno(stdout), _O_U16TEXT);
    cout << "\u0394\u03AD\u03BB\u03C4\u03B1" << endl;
    return 0;
}


For some reason, I get this error:


---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Debug Assertion Failed!

Program: ...sers\Owner\source\repos\assert_test\x64\Debug\assert_test.exe
File: minkernel\crts\ucrt\src\appcrt\lowio\write.cpp
Line: 659

Expression: buffer_size % 2 == 0

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)

---------------------------
Abort Retry Ignore
---------------------------


Any ideas why the code is producing that error?

Thank you.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.