User Profile

Collapse

Profile Sidebar

Collapse
Troy Martin
Troy Martin
Last Activity: Aug 9 '09, 03:11 AM
Joined: Aug 8 '09
Location: Langley, BC, Canada
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Troy Martin
    replied to null char in c
    in C
    It's best to do const char* name = "MEHMET"; instead, as it adds the trailing '\0' and it's good practice to not play with implicit casts when you're not sure what might happen :)
    See more | Go to post

    Leave a comment:


  • Troy Martin
    replied to What is the use of a void* pointer?
    in C
    The type void* is, as JosAH said, a pointer to any type. To be more accurate, it is a pointer to no type at all, as it is just a pointer. In order to use a void pointer, you must use either an explicit or (eech) an implicit cast.

    One of the advantages of void pointers are the fact you may cast it to anything. you may treat a void* as an int* on one line and an unsigned char* on the next.

    --Troy
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...