本计划显示四个卡套装(♠♣♥♦)在所有标准十岁上下的系统? [英] Does this program show the four card suits (♠♣♥♦) on all standard-ish systems?
本文介绍了本计划显示四个卡套装(♠♣♥♦)在所有标准十岁上下的系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面显示♠♣♥♦在Windows XP上,将它的所有系统??
的#include<&stdio.h中GT;
INT主(INT ARGC,CHAR *的argv [])
{
的for(int i = 3; I< = 6; ++ I)
的printf(%C(字符)我); 的getchar();
返回0;
}
解决方案
不。字符编码是一个非常依赖于平台,在我的经验。
考虑,在ASCII这些字符甚至不存在。而且我不知道他们在哪里在统一code。他们是在以往任何时候,你然后将根据你的平台如何统一输出code。
The following shows ♠♣♥♦ on windows xp, will it for all systems??
#include <stdio.h>
int main(int argc, char *argv[])
{
for (int i = 3; i <= 6; ++i)
printf("%c", (char)i);
getchar();
return 0;
}
解决方案
Nope. Character encoding is a very platform dependent, in my experience.
Consider, in ASCII those characters don't even exist. And I have no clue where they are in Unicode. And where ever they are, you would then be depending on how your platform outputs Unicode.
这篇关于本计划显示四个卡套装(♠♣♥♦)在所有标准十岁上下的系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文