What are the advantages of function prototype in c plus plus?

Answer:
The function prototype serves to ensure that calls to the function are made with the proper number and types of arguments. In the case of function overloading, the different prototypes serve to distinguish which version of the function to call.

The compiler will complain with an error, if no function prototype is found for any particular call to a function.
First answer by Alex146. Last edit by Alex146. Contributor trust: 419 [recommend contributor recommended]. Question popularity: 1 [recommend question].