是在qt中做的,所以用了qlist,可根据需要改成 stl 的 list

void GetStatus(unsigned int status, QList<bool>& listStatus)
{
    bool current = false;
    for (int i = 0; i < 32; i++) {
        if(status & (1 << i)){
            current = true;
        }
        else {
            current = false;
        }
        listStatus.push_back(current);
        
    }
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案