abs (built-in) function is not declared in this scope

Hi there,

I need to test a c++ FFT set of routines. So, I write this statement:

 
  value = 1.0 - abs((Position - (N-1)/2)/(N/2));


#include <math.h> is provided.

I get a compile error:

error: ‘abs’ was not declared in this scope

What is the problem? Thanks, - Alex
Last edited on
::abs is declared in <stdlib.h> (std::abs in <cstdlib>).
Last edited on
Thank you Peter. I actually found it out after I closed the post and was on my way to close the thread but some people are faster than me :-).
Topic archived. No new replies allowed.