Void Type

The type void is used to specify that a function does not return a value or as the type for pointers to objects of unknown type. For example:

void x;   // error---there are no void objects
void f(); // function f does not return a value
void *p;  // p is a pointer to an object of unknown type

Burton Ma
Department of Computing and Information Science
Queen's University