Udostępnij za pośrednictwem


Pointers to Type void

Pointers to type void can be converted to pointers to any other type, but only with an explicit type cast (unlike in C). (See Expressions with Explicit Type Conversions for more information about type casts.) A pointer to any type can be converted implicitly to a pointer to type void.

A pointer to an incomplete object of a type can be converted to a pointer to void (implicitly) and back (explicitly). The result of such a conversion is equal to the value of the original pointer. An object is considered incomplete if it is declared, but there is insufficient information available to determine its size or base class.

See Also

Reference

Pointer Conversions (C++)