本文介绍了910623-为什么位字段不能具有间接寻址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在以下结构中:

in the following struct:

struct
{
    bool simultaneousAction:1;
    bool action[7]:1;
};


我想知道为什么必须生成C2033?从逻辑上讲,它一定不是错误的.必须有一个字节的开头,该字节的第一个(LSb)被称为relativeAction,下一个字节被称为action [0],最后一个字节(MSb)被称为action [6].
这种情况有什么问题,为什么会出现以下错误?


i wonder why C2033 must be generated?! logically it must not be erroneous. there must be a byte first of which (LSb) be called simultaneousAction, the next bit be called action[0] and the last one (MSb) be called action[6].
what''s the problem with this scenario and why do i get the following error?

error C2033: ''AsServoMotorProperties::<unnamed-tag>::action'' : bit field cannot have indirection

推荐答案


这篇关于910623-为什么位字段不能具有间接寻址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 16:54