| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 521 人关注过本帖
标题:测试上下左右的 ASII 码
取消只看楼主 加入收藏
少林小和尚
Rank: 2
等 级:论坛游民
帖 子:57
专家分:26
注 册:2013-3-31
结帖率:73.68%
收藏
已结贴  问题点数:20 回复次数:0 
测试上下左右的 ASII 码
#include <conio.h>
#include <stdio.h>
void main()
{
     char c;
     while(1)
     {
            c=getch();
            if(c==27) {
                break;
            }
            else
                printf( "%c: %d\n", c, c );
     }
}


[local]1[/local]

为什么会出现 -32??
2
#include <conio.h>
#include <stdio.h>
int main()
{
    int c;
    while (27 != (c = getch()))
        printf("%d\n", c);
    return 0;
}

[local]2[/local]
为什么出现224.     只是c定义的不同   上面的是char    下面的是int



3
#include <conio.h>
#include <stdio.h>
int main()
{
    while(1)
    {
        wint_t  key;
        key=getch();
        if(key==0x00E0)
        {
            key=(key<<2)+getch();
        }
        printf("%d\n",key);
        printf("%c\n",key);
    }
    return 0;
}

[local]3[/local]


这个为什么是九百多??



求大神详细解释   感激不尽。。。
搜索更多相关主题的帖子: include return 左右 
2014-07-29 19:56
快速回复:测试上下左右的 ASII 码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022416 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved