cast to 'void *'

Discussion in 'C Programming' started by George Orwell, Dec 5, 2008.

  1. Ian Collins wrote:
    > Borked Pseudo Mailed wrote:
    >> The cast appears necessary in that case, since you're using
    >> an (int *).

    >
    > In what case?


    Are you having trouble following the discussion and making
    simple deductions, Mr. Collins? There's only one case of
    casting in the OP's post:

    printf("p=%p, x=%p\n", p, (void *)x);

    x is an (int *), so it requires the cast.

    I quote an OP only when I feel it's necessary.

    Yours,
    Han from China

    Il mittente di questo messaggio|The sender address of this
    non corrisponde ad un utente |message is not related to a real
    reale ma all'indirizzo fittizio|person but to a fake address of an
    di un sistema anonimizzatore |anonymous system
    Per maggiori informazioni |For more info
    https://www.mixmaster.it
     
    George Orwell, Dec 5, 2008
    #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. Ollej Reemt
    Replies:
    7
    Views:
    605
    Jack Klein
    Apr 22, 2005
  2. Stig Brautaset

    `void **' revisited: void *pop(void **root)

    Stig Brautaset, Oct 25, 2003, in forum: C Programming
    Replies:
    15
    Views:
    839
    The Real OS/2 Guy
    Oct 28, 2003
  3. Replies:
    5
    Views:
    886
    S.Tobias
    Jul 22, 2005
  4. Abhishek
    Replies:
    12
    Views:
    842
    Eric Sosman
    Jan 30, 2006
  5. Replies:
    1
    Views:
    439
    Victor Bazarov
    May 23, 2007
Loading...

Share This Page