试试呗
我的结论是不行
会报错 error C168: array of bit
手册描述:An array may not have type bit as its basic type. This limitation is imposed by the architecture of the 8051.
也就是这个数组总共的长度是6
unsigned
char
buff[6]
=
{
0
};
///
定义数组,数组元素全部初始化为0
unsigned
char
a
=
1,
b
=
2;
buff[4]
=
a;
buff[5]
=
b;
///
数组最后两个元素是变量a和b的值
至于前4个元素的值是什么,用同样地方法由自己设定