I didn't found any error function when I was searching the compilers (gcc, visual c, watcom). Therefore, I took an approximation from Abramowitz/Stegun and wrote my own erf(x). It's approximation error is about 10^(-7). which was almost always sufficient for my apps. erf(x) = 1-erfc(x).
Unfortunately, MS visual c++ and other poor compilers do not have any Gaussian erfxcz function implemented to date despite the C99 standard provides some error functions in math.h. (Then I cribbed from famous Irene Stegun's Handbook of Mathematical Functions, what sadly only contains an approximation of medium-range precision, possibly the old one from Goldstine.)
There are erf() and erfc() in gnu c and c++, header file is math.h, not cmath.h.
If you are interested in higher precision erf() (about 1e-14), you can send me a message. I have calculated some erf() with higher precision using rational functions in L1-approximation.