none
erfc function and boost library in VC++ RRS feed

  • Question

  • I am trying to use the erfc function in my program. I have downloaded the boost libraries and placed them and the appropriate hpp file at  

    C:\Program Files\boost\boost_1_35_0\boost\math\special_functions\erf.hpp

    In Visual C++ 2008, I enetred Tools\Options\VC++ Directories\Include Files and added the following directory

    C:\Program Files\boost\boost_1_35_0

    I then added the following include statement at the top of the program

    #include <boost\math\special_functions\erf.hpp>


    I keep getting the following error

    error C3861: 'erfc': identifier not found


    I have tried changing a number of things in the directories and Tools options but cannot get the program to recognize the erfc function.

    Can any one give me some advice on how to access the boost libraries from VC++.

    Thanks

    Wednesday, October 22, 2008 6:52 PM

Answers

  • I included under

    #include <boost\math\special_functions\erf.hpp>


    using boost::math::erfc;

    and that did the trick.

    Thank you for your help!!!

    G

    • Marked as answer by hydro1234 Wednesday, October 22, 2008 7:30 PM
    Wednesday, October 22, 2008 7:29 PM

All replies

  • Are you specifying the namespace as required?

    e.g. boost::math::erfc(....)

    Wednesday, October 22, 2008 7:10 PM
  • I included under

    #include <boost\math\special_functions\erf.hpp>


    using boost::math::erfc;

    and that did the trick.

    Thank you for your help!!!

    G

    • Marked as answer by hydro1234 Wednesday, October 22, 2008 7:30 PM
    Wednesday, October 22, 2008 7:29 PM