Data Types

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GoneFate
    New Member
    • May 2010
    • 4

    Data Types

    I need clarification of a void* pointer. What could be it be used for? Any reference material would be great.
  • nukefusion
    Recognized Expert New Member
    • Mar 2008
    • 221

    #2
    A void pointer points to a value that has no specific data type. It could therefore point to a integer, string or more complex type.

    This might be useful if you wanted to pass around a generic type as a parameter to a method. However, because a void pointer has no specific data type, the length and other properties of the data type cannot be determined.
    The downside of this is that it cannot be dereferenced until it is casted to a pointer of a specific datatype.

    MSDN includes some example code

    Comment

    Working...