Thread: the need of array of pointers

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    72

    Unhappy the need of array of pointers

    where we usually need an array of pointers?
    proud to be from aui www.aui.ma and also a great elton john's fan

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Code:
    int main(int argc, char *argv[]);

  3. #3
    Registered User
    Join Date
    Jan 2007
    Posts
    72
    sorry, but i said why it's useful
    proud to be from aui www.aui.ma and also a great elton john's fan

  4. #4
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    You don't see a need in that example? You don't see why it's useful to have an array of pointers that way?

  5. #5
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Quote Originally Posted by elton_fan View Post
    sorry, but i said why it's useful
    No you didn't. Do you want to know where it's useful or where it's needed?

    Try here: http://www.catb.org/~esr/faqs/smart-questions.html
    If you understand what you're doing, you're not learning anything.

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    When does one use an array? When one wants to store a variable or large number of values.
    When does one use a pointer? When one wants to reference an existing variable by address (or store a string).
    When does one use an array of pointers? Just combine the above definitions.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Returning an Array of Pointers to Objects
    By randomalias in forum C++ Programming
    Replies: 4
    Last Post: 04-29-2006, 02:45 PM
  2. two-dimensional dynamic array of pointers to classes
    By Timo002 in forum C++ Programming
    Replies: 4
    Last Post: 04-21-2005, 06:18 AM
  3. Passing pointers between functions
    By heygirls_uk in forum C Programming
    Replies: 5
    Last Post: 01-09-2004, 06:58 PM
  4. array of pointers to struct array
    By eth0 in forum C++ Programming
    Replies: 1
    Last Post: 01-08-2004, 06:43 PM
  5. array of pointers to structs
    By stumon in forum C Programming
    Replies: 7
    Last Post: 03-24-2003, 07:13 AM