Many languages and frameworks offer a “byte array” type, but the C++ standard library does not. What type is appropriate to use for medium-sized1, resizable byte arrays and how can I use that type efficiently? (particularly: allocating, passing as parameters and destroying)
1: By medium-sized I mean less than a 100 MB.
You can use
std::vector<unsigned char>, or as @Oli suggestedstd::vector<uint8_t>. Yes, you can pass around it, without copying the whole contents.