C++: How does string vectors' random access time work?
<p>I know a simple int vector have O(1) random access time, since it is easy to compute the position of the xth element, given all elements have the same size.</p>

<p>Now whats up with a string vector?</p>

<p>Since the string lengths vary, it can't have O(1) random access time, can it? If it can, what is the logic behind it?</p>

<p>Thanks.</p>

<p>Update:</p>

<p>The answers are very clear and concise, thank you all for the help.
I accepted Joey's answer because it is simple and easy to understand.</p>
