Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > 2D arrays: are all elements in a 2d array guarenteed to be contiguous?

Reply
Thread Tools

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

 
 
Paul
Guest
Posts: n/a
 
      11-24-2004
See topic;

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

Thanks much!
-Paul
 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      11-24-2004
On Tue, 23 Nov 2004 22:21:29 -0800, Paul <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newb: recurse over elements children and disable all form elements SteveKlett@gmail.com Javascript 4 09-20-2006 07:42 AM
XSLT: iterating all child elements and accessing homonymous childrenin sibling elements Gerald Aichholzer XML 2 06-27-2006 03:46 PM
To allow left click only on some elements of web page NOT all elements vikas.khengare@gmail.com Javascript 1 05-31-2006 09:26 AM
Kodak c330 - 512 Card Guarenteed Alan Digital Photography 4 01-24-2006 09:09 AM
Good LCD, no defects, Guarenteed! MarkH NZ Computing 36 05-16-2005 03:18 AM



Advertisments