Error C1083

I'm not making the program do anything useful right now, just trying to get it to compile.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <iostream>
using namespace std;
#include <math.h>
#include <fstream.h>


void loadData(int dayDate[], double highTemp[],double recordTemp[],
	int recordTempYear[], double relativeHumidity, int&dataCount);





int main()
{
	double highTemp[100],recordTemp[100],relativeHumidity[100];
	int recordTempYear[100], dayDate[100],dataCount;

	loadData(dayDate[],highTemp[],recordTemp[],recordTempYear[],
		relativeHumidity[], dataCount);

	return 0;
}

void loadData(int dayDate[], double highTemp[],double recordTemp[],
	int recordTempYear[], double relativeHumidity[], int&dataCount)
{
	fstream infile;
	
	infile.open("c:\\Documents and Settings\\Jake\\Desktop\\arraytest.txt", ios::in);
	dataCount=0;

	do
	{
		infile>>dayDate[dataCount];
		infile>>highTemp[dataCount];
		infile>>recordTemp[dataCount];
		infile>>recordTempYear[dataCount];
		infile>>relativeHumidity[dataCount];
		++dataCount;
	}
	while(dayDate[dataCount-1] != 0);
	infile.close();
	--dataCount;
}


This is the error I get:

1>c:\documents and settings\jake\my documents\visual studio 2010\projects\program6\program6\source1.cpp(7): fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory
Last edited on
The header is called <fstream>... not fstream.h

Likewise, if you're using C++, you probably should be using <cmath> instead of <math.h>
Last edited on
Topic archived. No new replies allowed.