+ 5
" prototype " ?
What is the difference between usual declaration of the function and prototype function ?
1 Resposta
+ 4
int f(); //Non-prototype declaration in C
/*Ordinary function declaration in C++ */
int f(void); //Prototype declaration
In C++ , this declares a function taking no parameters and returning int. In C ,this declares a function taking unknown parameters and returning int.
In other words, a "function prototype" is a function declaration that includes a list of parameter types.