The example you gave is a way of declaring a parameter that isn't actually used in the function, I know that sounds wrong, but it happens. If you don't put the parameter variable name in, the compiler wont complain when you don't reference it.
That is a declaration. The caller of a function uses the declaration to ensure that types match. The caller does not need to know the names of the parameters. Default values for parameters, if any, have to be in the declaration.
The implementation needs the names. How does it look in your example?
Older MSVC had trouble deducing types for template functions and occasinally resorted to dummy parameter just to specify a type. Templates are not yet on your plate.
I cant see any example on the book. Could you give me a simple example?
The only thing that comes to my mind when i see this code
float TimeToTarget(double&);
base on your explanation is that if for example i declared a function at the bottom of the main function then declare the name of the function in top of main
like this
1 2 3 4 5 6
TimetoTarget(double&); // this is the one that comes to my mind
int main(){
......
}