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 3 1501
* 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?
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sean Dettrick |
last post by:
Hi,
I have several <vector>'s of the same length, with entries
as follows:
I=
A=
B=
I want to use STL to make (I == 0) a mask to operate on the
elements of A and B, i.e. I want to do this:
|
by: Florian Liefers |
last post by:
"Hello World\n",
i have the following problem:
One of my headerfiles for a lib is including <vector>.
When i compile the lib, everything is done well.
In my application another file is...
|
by: Sims |
last post by:
Hi,
I have a structure as follow
struct sIntStructure
{
int m_nNumber;
//
// A few more variables
//
|
by: Ahmad |
last post by:
Hi all,
I have written a simple c++ app, as I'm still learning c++. The
thing works flawlessly on VC++6, but just doesn't work on g++. The
transliterate function which causes the problem is...
|
by: Russ Ford |
last post by:
I'm trying to overload the << operator to output vectors, as follows:
template <class T>
ostream& operator << (ostream& o, const vector<T>& v)
{
o << "< ";
copy (v.begin(), v.end(),...
|
by: Macca |
last post by:
Hi,
I have been using <fstream.h> in stdafx.h,(i'm using MFC) to output to
text files. I have now started to use vectors and when i added
#include <vector>
using namespace std;
to...
|
by: kuiyuli |
last post by:
I'm using VC++ .Net to do a simlple program. I tried to use <vector>
<list> in the program, and I simply put the folowing lines
"
#include <list>
#include <vector>
#include <string>
using...
|
by: cagenix |
last post by:
I was running through a data structures book and I was curious if anyone could inform me of how to inherit the vector class to do a simple search and erase function. The example states:
...
|
by: Birthe Gebhardt |
last post by:
Dear all,
I could not find the way to handle 'not normal' list objects, for example
using remove_if, find etc.
Example :
class Todo
{
public :
..
int getNumber(){ return num_;}
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |