In C++ functions can have parameters with default values
int Test ( int a = 1, int b = 2)
{
return a * b ;
}
now when the program calls Test with no parameters, the compiler will force them to the values shown above.
int return_value = Test();
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343