Besides syntactical differences, many people also prefer using void function(void)
for pracitical reasons:
If you're using the search function and want to find the implementation of the function, you can search for function(void)
, and it will return the prototype as well as the implementation.
If you omit the void
, you have to search for function()
and will therefore also find all function calls, making it more difficult to find the actual implementation.