what's wrong with this following prototype?

Mar 6, 2017 at 8:28pm
int askNumber(int low = 1, int high);
Mar 6, 2017 at 8:45pm
Defaulted arguments must be the right-most arguments.
Mar 7, 2017 at 2:50am
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.