»
(008) CubeIDE Implementation of USB Peripherals*
(014) Basic data type in C99
(018) C99 pointer*
(019) C99 With only value assignment*
(022) POSIX pthread multi-threads mutex*
(023) POSIX pthread multi-threads programming*
(027) C99 time and wait*
(028) High-precision calculation with GMP*
(029) Web Service Lib*
(030) International Components for Unicode (ICU)*
(031) Performance of C is higher than C++, because...*
今天是2024年,C99编译器早已拥有了bool数据类型。bool数据类型,它占1个字节,但,在C语言中需要引入头文件。而在C++中,bool类型占用的字节数取决于具体的平台以及编译器。所以,无论是C99还是C++14,在网络通信过程中,程序一般不使用bool类型的数据类型。
以下是与C++14一致的C99数据类型:
char 1字节
short 2字节
int 4字节
long (因操作系统和编译器不同而不同)4字节或8字节,windows x64为8字节
long long 8字节
float 4字节
double (因操作系统和编译器不同而不同)4字节或8字节,windows x64为8字节
long double 8字节
具体数据类型字节数规则制定过程,请查看本站C++14 基本数据类型