1

uint8_t の配列をバイトセットに変換する簡単な方法はありますか。

uint8_t test[16]; 
// Call a function which populates test[16] with 128 bits
function_call(& test);
for(int i=0; i<16; i++)
  cout<<test[0]; // outputs a byte
cout<<endl;
std:: bitset<128> bsTest;

私はこれを試しましたが、動作しません

bsTest(test);
4

1 に答える 1