c语言

来源:互联网 发布:虚拟局域网 软件 推荐 编辑:程序博客网 时间:2024/05/16 12:57

在C/C++中输出宽字符可以使用printf + %ls 或者 wcout,详细请看代码:
[cpp] view plain copy

// 【MoreWindows工作笔记1】 C/C++ 输出宽字符 printf + %ls or wcout

include

include

include

using namespace std;
int main()
{
printf(” 【MoreWindows工作笔记1】 C/C++ 输出宽字符 printf + %ls or wcout\n”);
printf(” - http://blog.csdn.net/morewindows/article/details/16358175 -\n”);
printf(” – By MoreWindows( http://blog.csdn.net/MoreWindows ) –\n\n”);

char text[] = “MoreWindows”;
WCHAR w_text[] = L”http://blog.csdn.net/MoreWindows“;

printf(“%s %ls\n”, text, w_text);

cout<

0 0
原创粉丝点击