C++ now enforces the use of the
const
qualifier on constant values> Change your function to:
int diap(const char* s, int low, int high)
Also, why are you inputting
double
types when all your comparisons and values are
int
types in the rest of the program? And, finally, your call to
diap
in your
main
function captures the return value but never does anything with it.