[Q]const char *const * ??

Discussion in 'C Programming' started by itsolution@gmail.com, Apr 6, 2008.

  1. Guest

    Hi Guys,


    When a function has following arg type,
    update_data(const char *const * update_list,...)

    exactly what object type update_list can take?

    For example, I can call update_aaa() using following variale as an
    arg:
    const char *updatelist_default[]={ "aaa", "bbb", NULL};

    Then, why the 2nd 'const' is necessary ? I mean,
    update_data(const char * * update_list,...) would work. But actually
    not!
     
    , Apr 6, 2008
    #1
    1. Advertising

  2. Guest

    Re: const char *const * ??

    Some errata. Just see below again:
    On Apr 5, 7:10 pm, wrote:
    > Hi Guys,
    >
    > When a function has following arg type,
    > update_data(const char *const * update_list,...)
    >
    > exactly what object type update_list is supposed to take?
    >
    > For example, I can call update_data() using following variale as an
    > arg:
    > const char *updatelist_default[]={ "aaa", "bbb", NULL};
    >
    > Then, why the 2nd 'const' is necessary ? I mean,
    > I thought update_data(const char * * update_list,...) would work. But actually
    > not! If not "const char *const * ", compiler complains!
     
    , Apr 6, 2008
    #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. Thomas Matthews
    Replies:
    5
    Views:
    2,520
    tom_usenet
    Aug 2, 2004
  2. Santa
    Replies:
    1
    Views:
    1,140
    Mark A. Odell
    Jul 17, 2003
  3. Replies:
    24
    Views:
    887
    Netocrat
    Oct 30, 2005
  4. lovecreatesbeauty
    Replies:
    1
    Views:
    1,124
    Ian Collins
    May 9, 2006
  5. Gary
    Replies:
    9
    Views:
    1,521
    CBFalconer
    Aug 24, 2006
Loading...

Share This Page