[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. 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. Tor Rustad

    cdecl test cases

    Tor Rustad, Mar 21, 2005, in forum: C Programming
    Replies:
    12
    Views:
    764
    Kevin D. Quitt
    Mar 28, 2005
  2. James Brown [MVP]

    help with 'left-right' cdecl rule

    James Brown [MVP], Feb 13, 2006, in forum: C Programming
    Replies:
    6
    Views:
    429
    Ben Bacarisse
    Feb 14, 2006
  3. Replies:
    5
    Views:
    430
  4. shanti

    cdecl

    shanti, Jun 3, 2007, in forum: C Programming
    Replies:
    12
    Views:
    1,050
    jaysome
    Jun 8, 2007
  5. Javier
    Replies:
    2
    Views:
    621
    James Kanze
    Sep 4, 2007
Loading...

Share This Page