How do I build a binary string in c++?
I want to have it in this format:
std::string str = signed long (4bytes) "fill out zeros" 0x000 (8bytes) signed long (4bytes)
Note I DO NOT want the viewable binary representation but the actual binary data in the string
uint8_t*in an explicit way (either by writing the individual bytes by means of bitshifts and explicit endianess or by resorting to unaligned integer load/store), possibly wrapped in astd::array<uint8_t>.std::string? It's not a sequence of characters; it's an arbitrary array of bytes. So use astd::vector<uint8_t>.