0

The variables in the function prototype Act as place holders. Why?

The variables in the function prototype Act as place holders. Why?

15th Mar 2017, 5:39 PM
Srikanth Srinivasan
Srikanth Srinivasan - avatar
1 Respuesta
0
It just gives information on what arguments should the function expect. Other than that, it is important when it comes to overloading operators or function. For example, we can overload a '-' operator so that if you pass it 2 arguments, it will perform a subtraction, but if you give it 1 argument, it will return a negative element (e.g. passing 8 would return -8).
20th Mar 2017, 2:02 AM
Jan Kliszcz
Jan Kliszcz - avatar