[cdecl] and const keyword

Discussion in 'C Programming' started by MaciekL, Feb 9, 2011.

  1. MaciekL

    MaciekL Guest

    Hi,

    [1]
    /> cdecl explain "int test(char *)"
    declare test as function (pointer to char) returning int

    [2]
    /> cdecl explain "int test(const char *)"
    declare test as function (pointer to const char) returning int

    [3]
    /> cdecl explain "int test(char const *)"
    syntax error

    [2] and [3] are equivalent :)

    Regards

    --
    Maciek
     
    MaciekL, Feb 9, 2011
    #1
    1. Advertisements

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. coala
    Replies:
    3
    Views:
    578
    coala
    Sep 6, 2006
  2. coala
    Replies:
    1
    Views:
    709
    Victor Bazarov
    Sep 6, 2006
  3. Replies:
    5
    Views:
    535
  4. Replies:
    11
    Views:
    1,405
  5. Javier
    Replies:
    2
    Views:
    892
    James Kanze
    Sep 4, 2007
  6. 0m
    Replies:
    26
    Views:
    1,479
    Tim Rentsch
    Nov 10, 2008
  7. fungus
    Replies:
    13
    Views:
    1,223
    fungus
    Oct 31, 2008
  8. Replies:
    2
    Views:
    690
    Andrew Koenig
    Feb 9, 2009
Loading...