473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

2D arrays: are all elements in a 2d array guarenteed to be contiguous?

See topic;

Context:
Passing arrays around in a MPI system(Message Passing Interface-
Parallel Program crap)

Thanks much!
-Paul
Jul 22 '05 #1
1 1230
On Tue, 23 Nov 2004 22:21:29 -0800, Paul <un******@rmci.net> wrote in
comp.lang.c++:
See topic;
Don't do that. There are some newsreaders still in wide use that do
not show the subject line while displaying bodies.
Context:
Passing arrays around in a MPI system(Message Passing Interface-
Parallel Program crap)
The context is immaterial.
Thanks much!
-Paul


In any case, the answer is no, there is no such guarantee, because
there is no such thing as a two (or higher) dimensional array in C++.
There are arrays of arrays, but the behavior is not defined for
accessing them as a single contiguous array with a type other than
unsigned char.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

50
by: SABmore | last post by:
Is there a performance advantage to parsing thru a recordset verus using an array? I'm currently trying to populate a listbox by returning data from my database, then either parsing thru the...
21
by: Matteo Settenvini | last post by:
Ok, I'm quite a newbie, so this question may appear silly. I'm using g++ 3.3.x. I had been taught that an array isn't a lot different from a pointer (in fact you can use the pointer arithmetics to...
10
by: Ian Todd | last post by:
Hi, I am trying to read in a list of data from a file. Each line has a string in its first column. This is what i want to read. I could start by saying char to read in 1000 lines to the array( i...
197
by: Steve Kobes | last post by:
Is this legal? Must it print 4? int a = {{1, 2}, {3, 4}}, *b = a; printf("%d\n", *(b + 3)); --Steve
8
by: masood.iqbal | last post by:
All this time I was under the illusion that I understand the concept of multi-dimensional arrays well ---- however the following code snippet belies my understanding. I had assumed all along...
38
by: Peteroid | last post by:
I looked at the addresses in an 'array<>' during debug and noticed that the addresses were contiguous. Is this guaranteed, or just something it does if it can? PS = VS C++.NET 2005 Express...
12
by: divya | last post by:
1. If The size of the array is unknown during programming time then how is such array declared?? Suppose there is an Array named arrClashname(size unknown at start), Now when the clash occurs...
7
by: Mrkljus | last post by:
Hi, ppl Somebody knows why this works in MSIE6 and not in MSIE7 : artPage=new Array(); artPage=new Array(); artPage=null; artPage=new Array(); artPage=1290; artPage=1291;
12
by: gnewsgroup | last post by:
I've read the msdn doc about IEnumerable. It seems to me that IEnumerable objects are essentially wrapped-up arrays. It simply gives us the foreach convenience. Is this correct?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.