#1,包含文件
#include<bitset>
#2,整数转化成二进制
int a = 63; bitset<6> bs(a);
#3,二进制转化成整数
int b = bs.to_ullong();
Powered by: 博客园 Copyright © 2024 sophia_hxw Powered by .NET 8.0 on Kubernetes