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
|
#include <iostream>
#include <fstream>
using namespace std;//I know this is bad, but it's how my professor wants us to use namespaces right now
void loadFile(istream &fin, string date[], double open[], double high[], double low[], double close[], int vol[], int& day);
int main(int argc, const char * argv[])
{
ifstream fin;
fin.open("google.dat");
if (fin.fail()){cout << "Opening Failed" << endl; exit(1);}
const int ARRAYMAX = 262;
string date[ARRAYMAX];
double open[ARRAYMAX];
double high[ARRAYMAX];
double low[ARRAYMAX];
double close[ARRAYMAX];
double vol[ARRAYMAX];
int day(0);
loadFile(fin, date, open, high, low, close, vol, day); // The error is with this function call
return 0;
}
void loadFile(istream &fin, string date[], double open[], double high[], double low[], double close[], int vol[], int& day)
{
//Function definition here
}
|