devxlogo

More on Default Arguments

More on Default Arguments

The order of evaluation of function arguments is unspecified. Consequently, parameters of a function may not be used in default argument expressions. For example, the following declaration is illegal:

           int f(int n, int m = n); /* error; 
parameter n used as default argument */

devx-admin

Share the Post: