wcout,wprintf()只打印英文 [英] wcout, wprintf() only print English
本文介绍了wcout,wprintf()只打印英文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有人真的设法使用wcout或
wprintf以及其他标准的宽字符函数来打印非英文文本?
Has anyone actually managed to print non-English text by using wcout or
wprintf and the rest of standard, wide character functions?
推荐答案
Ioannis Vranos写道:
Ioannis Vranos wrote:
有没有人真正设法使用wcout打印非英文文本或
wprintf以及其他标准的宽字符功能?
Has anyone actually managed to print non-English text by using wcout or
wprintf and the rest of standard, wide character functions?
例如:
[john @ localhost src]
For example:
[john@localhost src]
cat main .cc
#include< iostream>
int main()
{
使用namespace std;
wcout<< L" ??êéìáó?éêüìTí?ìá\\\
" ;;
}
[john @ localhost src]
cat main.cc
#include <iostream>
int main()
{
using namespace std;
wcout<< L"??êéìáó?éêü ìTí?ìá\n";
}
[john@localhost src]
./ foobar-cpp
??????????? ??????
[john @ localhost src]
./foobar-cpp
??????????? ??????
[john@localhost src]
这篇关于wcout,wprintf()只打印英文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文