When declaring a function prototype in C++ is there a difference between the following:
void SomeFunction( int Argument )
{
//Stuff
}
Versus
void SomeFunction( int )
{
//Stuff
}
Essentially what I'm asking, is why do you write a variable argument name in the prototype of the function rather than just the data type?
Argument names are not needed for compiler in function declarations. It is for human consumption. They give additional information on what the function is doing. Good function names coupled with good argument names serve as instant documentation for your method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With