c ++中的阿拉伯字符 [英] Arabic Character in c++
本文介绍了c ++中的阿拉伯字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好。我需要用C ++打印阿拉伯字符,问题是我不知道如何,请指导我一步一步,我如何编写该程序,如何使用unicode。请帮助我初学者。
Hello. I need to print arabic character using C++, the prob is i dont know how to, please guide me step by step, how i write that program, how to use unicode. Please help me iam beginner.
推荐答案
写非西方字符与编写西方字符大致相同。您可以使用wcout或wprintf执行此操作,例如:
Writing non-Western characters is much the same as writing western ones. You can do it with wcout or wprintf, something like:
wstring message = L"السلام عليك";
cout << message.c_str() << endl;
// or
wprintf(L"%s\n", message.c_str());
运行此命令时,请确保在命令窗口中使用正确的代码页,以便正确显示字符。
Make sure you use the correct codepage in your command window when running this so the characters display correctly.
这篇关于c ++中的阿拉伯字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文