One difference between std::string
and std::vector
is that programs may construct a string from a null-terminated string, whereas with vectors they cannot.
std::string a = "hello"; // okay
std::vector<char> b = "goodbye"; // compiler error
This often makes strings easier to work with.