views:

678

answers:

1

I want to use the math constants, such as M_PI and M_E, in Visual C++ 2008. I assumed they were defined in the cmath header.

+4  A: 

They are, but you also need to #define _USE_MATH_DEFINES before you #include <cmath>

davidi