Some variable in the function was not declared properly as a parameter variable or as a local variable inside the function. All variables need to be declared inside the function before they are used. Function is never executed. It will never run if you don't call it. Function is executed but never does anything.
Function does the wrong thing.
Check that the order of the arguments match the order of the parameter variables in the function. Put in cout's in the function to try to determine what it is doing.