[Q]const char *const * ??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • itsolution@gmail.com

    [Q]const char *const * ??

    Hi Guys,


    When a function has following arg type,
    update_data(con st 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_def ault[]={ "aaa", "bbb", NULL};

    Then, why the 2nd 'const' is necessary ? I mean,
    update_data(con st char * * update_list,... ) would work. But actually
    not!


  • itsolution@gmail.com

    #2
    Re: const char *const * ??

    Some errata. Just see below again:
    On Apr 5, 7:10 pm, itsolut...@gmai l.com wrote:
    Hi Guys,
    >
    When a function has following arg type,
    update_data(con st 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_def ault[]={ "aaa", "bbb", NULL};
    >
    Then, why the 2nd 'const' is necessary ? I mean,
    I thought update_data(con st char * * update_list,... ) would work. But actually
    not! If not "const char *const * ", compiler complains!

    Comment

    • copx

      #3
      Re: const char *const * ??


      <itsolution@gma il.comschrieb im Newsbeitrag
      news:756de563-f17f-4741-b7ba-446e3eb7a4e9@m1 g2000pre.google groups.com...
      [snip]
      If not "const char *const * ", compiler complains!
      What does he complain about? Post a builtable code snippet which triggers
      the warning, otherwise it is kinda hard to determine what is wrong.


      Comment

      Working...