Quote Originally Posted by christop View Post
I would try using pow() again instead of your power() function. It could have been the missing -lm that caused it not to work with variables for you (the compiler probably replaced pow(constant, constant) with a constant value without a call to pow())
that was the issue the missing -lm was causing all sorts of problems i think