I'm trying to write a simple file output program for my class. The error I recieve when I try to compile in VS .net 2003 is the following.
fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory
The code to my program is extremely straight forward as I always test a concept before incorporating it into the final solution. It's as follows:
#include <math.h>
#include <fstream.h>
#include <iomanip.h>
void main()
{
int a[25];
double s[25];
for(int n=0; n < 25; n++)
s[n] = sin(3.14159265*(a[n]=n*15)/180);
ofstream out("SineDataV2.txt", ios::out);
for(n=0;n<25;n++)
out << setw(5) << a[n] <<''<<setw(12)<<s[n]<<'\n';
out.close();
}
Any ideas why I can't include it? I'm pretty sure I'm including the correct file as MSDN reference tells me so: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang98/HTML/_iostream_ofstream.asp
Thanks in advance to those that help!