vector <unsigned char> vs string for binary data

Viewed 10306

Which is a better c++ container for holding and accessing binary data?

std::vector<unsigned char>

or

std::string

Is one more efficient than the other?
Is one a more 'correct' usage?

9 Answers
Related