不同的整数类型之间的区别 [英] Difference between different integer types

查看:118
本文介绍了不同的整数类型之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是什么 uint32_t的之间的差异, UINT32 ,当我在头看了看文件,这一点过这样的:

I was wondering what is the difference between uint32_t and uint32, and when I looked in the header files it had this:

types.h:

    /** @brief 32-bit unsigned integer. */
    typedef unsigned int uint32;
stdint.h:

    typedef unsigned   uint32_t;

这只会导致更多的问题:
之间有什么

This only leads to more questions: What is the difference between

unsigned varName;

unsigned int varName;

我使用的MinGW。

推荐答案

无符号 unsigned int类型是同义的,就像 [无符号]总之[INT] [无符号]长[INT]

unsigned and unsigned int are synonymous, much like [unsigned] short [int] and [unsigned] long [int].

uint32_t的是一类的(可选)由C标准定义。 UINT32 只是一个名字你做了,虽然它发生在被定义为同样的事情。

uint32_t is a type that's (optionally) defined by the C standard. uint32 is just a name you made up, although it happens to be defined as the same thing.

这篇关于不同的整数类型之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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