gpt4 book ai didi

c++ - fprintf 不打印 Unicode 字符

转载 作者:太空宇宙 更新时间:2023-11-04 02:09:11 24 4
gpt4 key购买 nike

<分区>

今天早上发现一个很奇怪的问题,一直找不到解决办法。请帮我用下面的代码解决这个问题(使用 Visual Studio C++ 和 MFC):

FILE *fp = NULL;
//fp = fopen(mmFileName , "a");
//Store the module directory path
fopen_s( &fp , "TempWorking.xml" , "wb");
//char* TempChar;
CString strtempff;
strtempff = "\"&lt;article&gt; &lt;section class=&quot;page&quot;&gt;&lt;p&gt;Writing for the clown show that is &lt;em&gt;Forbes&lt;/em&gt;, Darcy Travlos asks the &lt;a href=&quot;http://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines&quot;&gt;Betteridge’s Law&lt;/a&gt;-challenging question “Apple And Google: The New ‘Old’ Reality?†(No link but tip o’ the an";
char* TempArray;
TempArray = new char[strtempff.GetLength()];
strcpy(TempArray,strtempff.GetString());
strtempff = "";
strtempff.Empty();
fprintf(fp,(char*)TempArray);

我不知道为什么我的代码在 fprintf() 语句中不起作用:它给了我一个调试断言。 strtempff 摘自网络,仅作为示例代码

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com