e******n 发帖数: 86 | 1 For a binary variable (it can contain either a 0 or a 1).
Is there any way I can define a data type that uses only 1 bit.
Currently, I defined it as byte variable
//xiexie | f********r 发帖数: 50 | 2 consider bit field in structure instead
【在 e******n 的大作中提到】 : For a binary variable (it can contain either a 0 or a 1). : Is there any way I can define a data type that uses only 1 bit. : Currently, I defined it as byte variable : //xiexie
| t****n 发帖数: 15 | 3 If c/c++, use bit field. Or use vector if you need to define an array.
【在 f********r 的大作中提到】 : consider bit field in structure instead
|
|