score:8; 这个8是啥意思啊?struct word_record{uint32_t score:8;uint32_t perfect:8;uint32_t wrong:8;uint32_t right:8;uint32_t decayScore:8;uint32_t lastRev:24;};

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/24 10:04:31
score:8;这个8是啥意思啊?structword_record{uint32_tscore:8;uint32_tperfect:8;uint32_twrong:8;uint32_tright:8

score:8; 这个8是啥意思啊?struct word_record{uint32_t score:8;uint32_t perfect:8;uint32_t wrong:8;uint32_t right:8;uint32_t decayScore:8;uint32_t lastRev:24;};
score:8; 这个8是啥意思啊?
struct word_record
{
uint32_t score:8;
uint32_t perfect:8;
uint32_t wrong:8;
uint32_t right:8;
uint32_t decayScore:8;
uint32_t lastRev:24;
};

score:8; 这个8是啥意思啊?struct word_record{uint32_t score:8;uint32_t perfect:8;uint32_t wrong:8;uint32_t right:8;uint32_t decayScore:8;uint32_t lastRev:24;};
score:8这种语法是score只占用8个bit
这种语法很少使用,一般用在可用内存很小和嵌入式编程上