what's wrong with this following prototype?
int askNumber(int low = 1, int high);
Defaulted arguments must be the right-most arguments.
You might be able to achieve what you want by overloading the function:
1 2
|
int askNumber(int low, int high);
int askNumber(int high) { return askNumber(1, high); }
|
Topic archived. No new replies allowed.