Hello everybody,

i'm a beginner in programming, so I hope someone can help me.
I'm programming in Visual Studio 2008 in C++ and I'd like to use the error functionor the complementary one, erf(x) and erfc(x). I've looked for a solution in the internet and I've seen that including math.h should be enough, because this function is in this header. So I tried doing #include <math.h>,#include <math>, #include "math.h",#include <cmath.h>, #include <cmath> but during compilation an error appears, C3861: not found "erf" identifier.

Could someone help me solving this?

Thank you very much

Thank you very much Aranarth, but I'm not used to those terms and would you mind to explain me what should I do? step by step in such a way that a obtuse can understand?
Thank you again

boost is a library that provides a lot of frequently needed functionality.
As you can see, boost has numerous sub-libraries:
http://www.boost.org/doc/libs/1_43_0/

Math/Special Functions is the one you need in this case.
To install boost, refer to the installation guide on the boost site.

C99 standard defines some erf() in math.h (not cmath). Unfortunately, MS C++ math.h doesn't have erf().

Maybe my little erf() once I posted here can also help you. Sure, boost is the best.

-- tesu

Hi guys, i have more problems with it. I decided to use boost, but by compiling, the errors appear. The errors are that the header files cannoy be opened. That was because the "includes" are writen in the following form:

<boost/math/special_functions/math_fwd.hpp>

I could solve this problem by changing the <> symbols by ". So the correct sentence is:

"boost/math/special_functions/math_fwd.hpp"

But in this way, I should change lots of files. I think that there must be another solution to this problem. Could any of you help me?

Thanks a lot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.