Thanks laserlight!
Great reply. :-)
Two more comments,
1.
I can understand the overhead of maintaining multiple container compared with one container. But I am not sure what do you mean "some lower value"? Confused. What are the so called lower value do you mean? :-)
2.
I can understand that accessing v[0] is undefined behavior since v[0] does not exist for an empty vector.
What do you understand is why as you guys mentioned before "triggers undefined behavior even if p is not dereferenced" in the following code segment. I think it should be ok (not undefined behavior) if p is not dereferenced. :-)
Please feel free to correct me if I am wrong. :-)
Code:std::vector<T> v;
T *p = &v[0];
have a good weekend,
George

