fatal error C1083: Cannot open include file 'math'

I am running VS.net 2003,
I need in include the old math.h header file. Now I seached my HD and in fact found the math.h file in the"  F:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include " folder (note I instaled VS.net2003 on a HD NOT my system HD and I also have 'dualboot' with win98 & win2k ).
Here is what I have started with:

#include <iostream>
#include <math>
using namespace std;

void main()
{
float userNum=0.0;
int workNum=0;


    cout << "Enter total amount: ";
    cin >> userNum;
}

And this is the error message from the compiler:

fatal error C1083: Cannot open include file 'math': no such file or dif:<project folder>

Now I did copy math.h to the project file and tried to use #include<math.h> and #include<./math.h> The number of errors was grand.  Any ideas

TIA

Robert S. Albert
AKA MAdWizard


Answer this question

fatal error C1083: Cannot open include file 'math'

  • Tariq Abu Dayyeh

    Thx,

    It is under TOOLS/OPTIONS .....

    TIA
    Robert S. Albert
    AKA MAdWizard


  • finlandrocks

    You need to add the path to math.h to your include directories.  Just copying a file won't work, because it will rely on other files that are not going to be in the new folder you moved it to.

     It looks like that folder should be in your include directory anyhow, so you need to add it, no matter what.  check your lib folders as well.

     



  • Shaby

    MAdWizard wrote:

    #include <math>

    Forgive me, but shouldn't that be either:

    #include <math.h>

    or:

    #include <cmath>

    If so, then your problem was just a typo, and you didn't need to fiddle with the directories.



  • Jimmy Li

    tools/options/projects and solutions.



  • fatal error C1083: Cannot open include file 'math'