accessing math functions in .cpp file, arduino 18

Hello,

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/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h:439: error: expected unqualified-id before 'double'

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h:439: error: expected `)' before 'double'

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h:439: 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?

Hello,

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.