Void Type Article Index for
Void
Shopping
Void
Website Links For
Void
 

Information About

Void Type




  • "), which despite the name has little to do with the other uses of void. Variables of this type are Pointer s to data of an unspecified type, so in this context (but not the others) void acts as a universal or Top Type . A program can convert a pointer to any type of data to a pointer to void and back to the original type without losing information, which makes these pointers useful for Polymorphic functions.


The void type is a product of Standard C . In earlier versions of C, functions with no specific result defaulted to a return type of "int" and functions with no arguments simply had empty argument lists. Pointers to untyped data were declared as integers or pointers to "char". Some early C Compiler s had the feature, now seen as an annoyance, of generating a warning on any function call that did not use the function's returned value. Old code sometimes Casts such function calls to void to suppress this warning.