The error keep giving me initial value of reference to non-const must be an lvalue.The error comes when i am trying to pass a function into the parameter. Any help will be wonderful
one possible error that i can see is that your ChoosingPivot function returns an int by value. However, you are providing that as an input to your Partitioning function that expects a reference.
well first you will have to check whether this IS the problem.
remove all references (&s) from the function paramters and check whether your program compiles.
Then you can think of which parameter you want to input as reference and why. is it the speed issue or is it that you want to keep only one copy during recursion or what?