Also sometimes you will see something like:
void* foo(void);
In this case, the function explicitly declares that it does not accept parameters. Why would you do this and not just leave the options? The lack of parameters for historical reasons actually means a single parameter void * or int *.
void* foo();
foo(x);
This will work and compile, but it is not clear that the variable passed into it was not intended.
source
share