找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5320|回复: 6
收起左侧

求助 关于uint unsigned int

[复制链接]
ID:163511 发表于 2017-7-30 21:41 | 显示全部楼层 |阅读模式
uint unsigned int
....
uint read()
{
...
}
这样也可以??

回复

使用道具 举报

ID:149988 发表于 2017-7-31 07:14 | 显示全部楼层

RE: 求助 关于uint unsigned int


uint是unsigned int的简化写法,以后再要用到unsigned int直接写成uint就可以了。
回复

使用道具 举报

ID:149988 发表于 2017-7-31 07:57 | 显示全部楼层

RE: 求助 关于uint unsigned int

这是宏定义的方法,前面应该加#define 写成这样#define uint unsigned int。unsigned int就被uint代替了,以后要用到unsigned int直接写成uint就可以了。
回复

使用道具 举报

ID:222333 发表于 2017-7-31 14:51 | 显示全部楼层
前面应该是#define uint unsigned int 意思就是用uint表示unsigned int 然后后面程序中需要无符号的int时都可以用uint来直接代替unsigned int
回复

使用道具 举报

ID:223579 发表于 2017-7-31 15:22 | 显示全部楼层
可以的
回复

使用道具 举报

ID:219800 发表于 2017-7-31 15:40 | 显示全部楼层
先定义一下uint,也就是#define uint unsigned int
回复

使用道具 举报

ID:187532 发表于 2017-7-31 18:11 来自触屏版 | 显示全部楼层
可以在程序开头进行宏定义,#define uint unsigned int 注意这里没有分号,也可以这样子写typedef unsingned int uint;注意这里有分号
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表