如何在C下使用linux下的swprintf()? [英] How to use swprintf() under linux in C?

查看:370
本文介绍了如何在C下使用linux下的swprintf()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尽力使用swprintf() - 但我似乎无法理解我做错了什么。以下样本将打印1,而不是Hello的长度。 - 5.(没有编译器错误或警告)

I tried my best to use swprintf() - but I don''t seem to grasp what I''m doing wrong. The following sample would print 1, instead of the length of "Hello" - 5. (There are no compiler errors or warnings)

展开 | 选择 | Wrap | 行号

推荐答案

尝试:
展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号


感谢RedSon的响应,但不幸的是,当我执行你的样本时,它打印15,是不是正确数量的宽字符 - 20?
Thanks for the response RedSon, but unfortunately when I execute your sample it prints 15, isn''t the correct amount of wide-characters - 20?


当你使用swprintf时,输出会以你期望的方式显示吗?有什么问题? swprintf的输出是错误的还是strlen输出不是你所期望的?
When you use swprintf does the output show up the way you expect? What is the issue? The output of swprintf is wrong or the strlen output is not what you expect?


这篇关于如何在C下使用linux下的swprintf()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆