I know that it is legal to "convert" a vector to a c-style Array using the following method:
std:vector<char> v;
char *c = &v[0];
Is the same also true for a std::deque?
I know that it is legal to "convert" a vector to a c-style Array using the following method:
std:vector<char> v;
char *c = &v[0];
Is the same also true for a std::deque?
No. In general, the contents of a
std::deque
are not stored contiguously:From here.