当前位置:网站首页>Int and bit group turn to each other
Int and bit group turn to each other
2022-07-01 01:51:00 【Friendly, friend】
int Indexable array
#include <QDebug>
#include <bitset>
int main(int argc, char *argv[])
{
std::bitset<16> bits(1086);
bits[0] = 1;
for(std::size_t i = 0;i < bits.size();++i)
{
qDebug()<< bits[i];
}
}Digit group transfer int
Use :QBitArray::toUInt32():
QBitArray bits(16);
bits.setBit(15);
bits.setBit(3);
bits.setBit(2);
bits.setBit(1);
qDebug()<<bits.toUInt32(QSysInfo::BigEndian);
qDebug()<<bits.toUInt32(QSysInfo::LittleEndian);
QByteArray array = bits.bits();
qDebug()<<QString(array.toHex());
边栏推荐
- 机器学习9-通用逼近器径向基函数神经网络,在新观点下审视PDA和SVM
- Sitge joined the opengauss open source community to jointly promote the ecological development of the database industry
- Last day of the second quarter
- zabbix如何配置告警短信?(预警短信通知设置流程)
- opencv -- 笔记
- 哪有什么未来可期,不过是打工人临死前最后的幻想罢了
- Understanding and application of Qt5 layout in creation
- FL Studio20.9水果软件高级中文版电音编曲
- Mathematical knowledge: finding combinatorial number IV - finding combinatorial number
- VirtualBox 安装增强功能
猜你喜欢

There is no future to be expected. It is just the last fantasy of a migrant worker before he dies

7-2 punch in reward DP for puzzle a

In the fourth week of June, the list - flying melon data up main growth ranking list (BiliBili platform) was released!

Understanding and application of Qt5 layout in creation

Video tutorial | Chang'an chain launched a series of video tutorial collections (Introduction)

With regard to the white box test, you have to master these skills~

(翻译)实时内联验证更容易让用户犯错的原因
![[无线通信基础-15]:图解移动通信技术与应用发展-3- 数字通信2G GSM、CDMA、3G WDCMA/CDMA200/TD-SCDMA、4G LTE、5G NR概述](/img/22/1efa444220131359b06005f597c9db.png)
[无线通信基础-15]:图解移动通信技术与应用发展-3- 数字通信2G GSM、CDMA、3G WDCMA/CDMA200/TD-SCDMA、4G LTE、5G NR概述

工作八年的程序员,却拿着毕业三年的工资,再不开窍就真晚了...

CorelDRAW 2022中文精简64位直装版下载
随机推荐
System. Csrebot for commandline
Laravel event & Monitoring
【Proteus仿真】Arduino UNO +74C922键盘解码驱动4X4矩阵键盘
Creating ASCII art with C #
php将二维数组元素转为键值对
【Content-Type请求头的内容】
[content of content type request header]
TypeError: Argument ‘angle‘ can not be treated as a double
Understanding and application of Qt5 layout in creation
3500 word summary: a complete set of skills that a qualified software testing engineer needs to master
[fundamentals of wireless communication-15]: illustrated mobile communication technology and application development-3-overview of digital communication 2G GSM, CDMA, 3G wdcma/cdma200/td-scdma, 4G LTE
opencv -- 笔记
[queue] 933 Number of Recent Calls
Lecun, a Turing Award winner, pointed out that the future of AI lies in self-learning, and the company has embarked on the journey
Handsontable数据网格组件
What other hot spots are hidden under 1500W playback? Station B 2 future trends you can't miss
Short video platform development, relying on drawerlayout to achieve side sliding menu effect
laravel+redis 生成订单号-当天从1开始自增
数据探索电商平台用户行为流失分析
股票开户有哪些优惠活动?另外,手机开户安全么?