c++ 标准数据类型
来源:互联网 发布:神舟linux系统重装变小 编辑:程序博客网 时间:2024/05/29 17:33
int 类型与操作系统,编译器相关
如:win32下为32位,win64下为64位
如果软件有移植需求,请使用固定大小的数据类型
注意:long 的字节数是不随平台改变的,都是4字节
补充:
BYTE1字节typedef unsigned char BYTE;
WORD2字节typedef unsigned short WORD;
DWORD4字节typedef unsigned long DWORD;
数据类型名称
字节数
别名
取值范围
int
*
signed,signed int
由操作系统决定,即与操作系统的"字长"有关
unsigned int
*
unsigned
由操作系统决定,即与操作系统的"字长"有关
__int8
1
char,signed char
–128 到 127
__int16
2
short,short int,signed short int
–32,768 到 32,767
__int32
4
signed,signed int
–2,147,483,648 到 2,147,483,647
__int64
8
无
–9,223,372,036,854,775,808 到 9,223,372,036,854,775,807
bool
1
无
false 或 true
char
1
signed char
–128 到 127
unsigned char
1
无
0 到 255
short
2
short int,signed short int
–32,768 到 32,767
unsigned short
2
unsigned short int
0 到 65,535
long
4
long int,signed long int
–2,147,483,648 到 2,147,483,647
long long
8
none (but equivalent to __int64)
–9,223,372,036,854,775,808 到 9,223,372,036,854,775,807
unsigned long
4
unsigned long int
0 到 4,294,967,295
enum
*
无
由操作系统决定,即与操作系统的"字长"有关
float
4
无
3.4E +/- 38 (7 digits)
double
8
无
1.7E +/- 308 (15 digits)
long double
8
无
1.7E +/- 308 (15 digits)
wchar_t
2
__wchar_t
0 到 65,535
- 标准C或C++没有的数据类型
- 标准C或C++没有的数据类型
- 从IEEE754标准谈C语言浮点数据类型
- C标准库定义的UNIX系统的基本数据类型
- C语言的标准和一些基本的数据类型
- SQL标准数据类型
- SQL标准数据类型
- c++ 标准数据类型
- 数据类型 与 标准IO
- 标准数据类型上下限
- ANSI标准数据类型
- 抽象数据类型标准库
- SQL标准数据类型
- SQL标准数据类型
- c++ 标准数据类型
- 标准数据类型特性总结
- c++ 标准数据类型
- python标准数据类型
- redhat9.0 虚拟机中识别U盘
- C# 中的委托和事件
- 2010和2009年软件设计师考试大纲对比
- .net,c#的一份笔试题
- 文件上传功能 struts xml配置
- c++ 标准数据类型
- eclipse 新建 java 文件时自动生成注释
- Hyper-V实战之多个Windows 2008安装
- 关于forward和redirect的区别
- 在Java中产生随机数的两个方法
- ajax指定为post但是未设置content-type时如何获取提交的内容
- Adobe Flex 编码规范
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CTrunkPage::* )(void)' to 'void (__thiscall CCmdTarget::* )(N
- Pyke 简介 (4) :Pyke 是什么?