what is the difference between void * and function?
When should I use void * and when should I use function?
First of all, void * and void is a difference.
void * can return a pointer, void not. Also function can always return something, so it seems that function is something like var.
type name (parameter1, parameter2, ...) { command1; command2; ... }
type is the type of the variable (such as var, int, float...) that the function returns to the caller. If the function returns a var, or returns nothing, you can write just function instead of the type.
..............
void:
When used as a function return type, the void keyword specifies that the function does not return a value. When used for a function's parameter list, void specifies that the function takes no parameters.
void*:
A void pointer can be converted into any other type of data pointer.