error: called object type ‘int’ is not a function or function pointer
Your local variable mid is declared in the scope that is closer to the point of use, so it “shadows” the mid() function; the compiler thinks that you are trying to “call” an integer, which is invalid. Rename the local variable to fix this problem: Note: you could also use ::mid(lo, hi) instead of renaming … Read more