Multi-dimensional Pointers in C++

Discussion in 'C++' started by Varun Sud, Aug 31, 2005.

  1. Varun Sud

    Varun Sud Guest

    Hi,
    I have written an article declaring and using multi-dimensional
    pointers in C++. The article tries to address many of the issues
    related to multi-dimensional pointers asked in the forum.

    Article link:
    http://www.geocities.com/varunhostel/TechnicalArticles/PointerArticle/PointerArticle_Intro.html

    Some of the questions answered in the article are:

    Chapter 9: How do I dynamically allocate memory for a 3-dimensional
    pointer equivalent to an array a[2][3][4]?
    Chapter 6: To what extent can I inter-change pointer and array syntax
    in C++?
    Chapter 11: How do I decipher very long function pointer declarations?
    Is there a standard approach for it?
    Chapter 11: What is the difference between the two declarations: int
    *ptr[5] and int (*ptr) [5]?


    I wanted the above topics in the article to be validated by a more
    experienced person. I expect that there could be a few subtle
    complications that I have missed out on. Please respond
    enthusuastically and e-mail your responses or just post in the forum.

    Thanks,
    Varun Sud
    http://www.geocities.com/varunhostel/
     
    Varun Sud, Aug 31, 2005
    #1
    1. Advertising

  2. Varun Sud

    Mike Wahler Guest

    "Varun Sud" <> wrote in message
    news:...
    > Hi,
    > I have written an article declaring and using multi-dimensional
    > pointers in C++. The article tries to address many of the issues
    > related to multi-dimensional pointers asked in the forum.


    Well then I need not read it, since there's no such
    thing as a multi-dimensional pointer in C++. Pointers
    don't have 'dimensions'. They have a type and can
    represent an address value (or 'no-address' via a
    'NULL' value.)

    >
    > Article link:
    > http://www.geocities.com/varunhostel/TechnicalArticles/PointerArticle/PointerArticle_Intro.html
    >
    > Some of the questions answered in the article are:
    >
    > Chapter 9: How do I dynamically allocate memory for a 3-dimensional
    > pointer equivalent to an array a[2][3][4]?
    > Chapter 6: To what extent can I inter-change pointer and array syntax
    > in C++?
    > Chapter 11: How do I decipher very long function pointer declarations?
    > Is there a standard approach for it?
    > Chapter 11: What is the difference between the two declarations: int
    > *ptr[5] and int (*ptr) [5]?
    >
    >
    > I wanted the above topics in the article to be validated by a more
    > experienced person. I expect that there could be a few subtle
    > complications that I have missed out on. Please respond
    > enthusuastically and e-mail your responses or just post in the forum.


    How about you read the C++ FAQ first?

    http://www.parashift.com/c -faq-lite/

    -Mike
     
    Mike Wahler, Aug 31, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alf P. Steinbach
    Replies:
    0
    Views:
    436
    Alf P. Steinbach
    Aug 18, 2003
  2. John Harrison
    Replies:
    4
    Views:
    6,927
    Default User
    Aug 19, 2003
  3. Icosahedron
    Replies:
    8
    Views:
    656
    Vivek
    Aug 21, 2003
  4. Richard Hayden

    C multi-dimensional arrays and pointers

    Richard Hayden, Nov 1, 2004, in forum: C Programming
    Replies:
    4
    Views:
    982
    Dave Thompson
    Nov 8, 2004
  5. Wirianto Djunaidi
    Replies:
    2
    Views:
    203
    Wirianto Djunaidi
    Apr 29, 2008
Loading...

Share This Page