Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 位数组移位_C++_Qt_Bit Manipulation_Bit Shift - Fatal编程技术网

C++ 位数组移位

C++ 位数组移位,c++,qt,bit-manipulation,bit-shift,C++,Qt,Bit Manipulation,Bit Shift,如何在QT中移动QBitArray 例如,我有0010000,我想向左移动,所以我会得到0100000。关于QBitArray中没有用于此的函数。QBitArray的目的是将其用于任意大小的位掩码,而不是用于算术运算。不能移动QBitArray。如果您认为需要移动QBitArray,那么很可能您滥用了这个类,而不是使用它。是的,我可能滥用了它,到目前为止,它已经派上了用场:)只是认为它在某种程度上是可能的。那么你建议使用哪个容器?@PrimožKralj只需使用std::bitset。谢谢,它更

如何在QT中移动QBitArray


例如,我有0010000,我想向左移动,所以我会得到0100000。关于QBitArray中没有用于此的函数。

QBitArray的目的是将其用于任意大小的位掩码,而不是用于算术运算。不能移动QBitArray。如果您认为需要移动QBitArray,那么很可能您滥用了这个类,而不是使用它。

是的,我可能滥用了它,到目前为止,它已经派上了用场:)只是认为它在某种程度上是可能的。那么你建议使用哪个容器?@PrimožKralj只需使用std::bitset。谢谢,它更适合我的需要。