这个程序显示所有标准系统上的四张牌套装(♠♣♥♦)吗? [英] Does this program show the four card suits (♠♣♥♦) on all standard-ish systems?

查看:137
本文介绍了这个程序显示所有标准系统上的四张牌套装(♠♣♥♦)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下显示了在Windows XP上的♠♣♥♦,对于所有系统都会是?

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.

在ASCII中考虑这些字符甚至不存在。我不知道他们在Unicode中。无论何时,它们都将取决于您的平台如何输出Unicode。

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屋!

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