+ 1
What difference between [void func(void)] with the function [void func()] . Bath functions are the same parameter
3 Respostas
+ 1
Actually, it depends on whether you're typing this in C or C++.
In C++, both are semantically similar.
In C, not specifying anything in the function parameter list would mean that the function takes an unspecified number of arguments, whereas placing "void" in the parameter list declares that the function takes no parameters.
https://stackoverflow.com/questions/5929711/c-function-with-no-parameters-behavior
0
No difference. function() and function (void) are the same and the compiler will not allocate stack for untyped parameter.
0
Thank you.