accessing math functions in .cpp file, arduino 18


I include a file "stats.h" from my main pde. in stats.cpp, I wish to use the sqrt function.

If I include "math.h", I get the following errors.

/Applications/ error: expected unqualified-id before 'double'

/Applications/ error: expected `)' before 'double'

/Applications/ error: expected `)' before 'double'

these happen with or without actually trying to call the sqrt function.

any help would be great.

thanks, Lucas

If I include "math.h", I get the following errors

Where are you including math.h? In stats.h? In stats.cpp? In the .pde file?


pde includes stats.h stats.cpp includes stats.h and math.h

I wish to gain access to the routine in stats.cpp

Does the PDE, stats.h, or stats.cpp contain anything named "round". A #define perhaps? Or a variable named "round"? Or a function named "round"?

Try include the math.h file in the sketch (the .pde file), too.

nothing named round

including "math.h" in the pde worked! thank you.