Possible Duplicate:
round() for float in C++
I used mingw and eclipse with c++98 on my laptop. But on my pc I have vs2012.
Now I have a small problem, the math library seems to be completely different.
in c++98 I had access to round and M_PI with math.h. But in vs2012 it isn’t there anymore. I made a google search and found the following reference http://en.cppreference.com/w/cpp/numeric/math/round
But round is not in cmath and it is not in math.h either. Also I am unable to find M_PI
Is there another math library?
These are new in C++11. MinGW had it before because of C compat, but VS2012 is not a C99 compiler. M_PI is probably the same story. IOW, you were relying on implementation-specific behaviour with MinGW, now it’s Standard behaviour but VS hasn’t upgraded quite yet.