By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,904 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,904 IT Pros & Developers. It's quick & easy.

Contiguous storage for <vector>

P: n/a
Where is it specified that data storage for <vector> must be contiguous? i.e.,

Assuming v is a vector of some size,

&v[1] == &v[0] + 1;

-dr
Oct 25 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* Dave Rahardja:

Where is it specified that data storage for <vector> must be contiguous? i.e.,

Assuming v is a vector of some size,

&v[1] == &v[0] + 1;


23.2.4/1 in C++2003, "The elements of a vector are stored contigously, ...".

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Oct 25 '05 #2

P: n/a
On Tue, 25 Oct 2005 13:41:23 GMT, al***@start.no (Alf P. Steinbach) wrote:
* Dave Rahardja:

Where is it specified that data storage for <vector> must be contiguous? i.e.,

Assuming v is a vector of some size,

&v[1] == &v[0] + 1;


23.2.4/1 in C++2003, "The elements of a vector are stored contigously, ...".


What is this C++2003 you speak of?

-dr
Oct 26 '05 #3

P: n/a
On Wed, 26 Oct 2005 02:33:16 GMT, Dave Rahardja <as*@me.com> wrote:
On Tue, 25 Oct 2005 13:41:23 GMT, al***@start.no (Alf P. Steinbach) wrote:
* Dave Rahardja:

Where is it specified that data storage for <vector> must be contiguous? i.e.,

Assuming v is a vector of some size,

&v[1] == &v[0] + 1;


23.2.4/1 in C++2003, "The elements of a vector are stored contigously, ...".


What is this C++2003 you speak of?


Never mind! My copy of the Standard is obsolete. Duly updated.

-dr
Oct 26 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.