如何申报在C 32位整数 [英] How to Declare a 32-bit Integer in C

查看:130
本文介绍了如何申报在C 32位整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是声明一个整数类型,是在任何平台上总是4字节的最好方法?我不担心其中有16位 INT

某些设备或旧机器
解决方案

 的#include< stdint.h>int32_t my_32bit_int;

What's the best way to declare an integer type which is always 4 byte on any platforms? I don't worry about certain device or old machines which has 16-bit int.

解决方案

#include <stdint.h>

int32_t my_32bit_int;

这篇关于如何申报在C 32位整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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