2019-01-22から1日間の記事一覧

1バイトデータの任意のビットを任意のビットへ動かす

#include <stdio.h> //#include <sstream> //#include <bitset> //#include <string> //#include <iostream> //using namespace std; /*// 1バイトデータを2進数の数「字」として表示するための函数 void printByteAsBin(uint8_t oneByte){ std::stringstream s; s << std::bitset<8>(oneByte); std::stri</iostream></string></bitset></sstream></stdio.h>…