Which is a better c++ container for holding and accessing binary data?
std::vector
or
std::string
Personally I prefer std::string because string::data() is much more intuitive for me when I want my binary buffer back in C-compatible form. I know that vector elements are guaranteed to be stored contiguously exercising this in code feels a little bit unsettling.
This is a style decision that individual developer or a team should make for themselves.