Passing Array to Function

Hello all,
I'm assigned a project for school (due in 2 weeks) and I need to pass multiple array to a function. I've done it before, but Xcode is giving me the error "No matching function for call to 'loadFile'".
I am working on a Mac.
I know how to do my assignment, but I cannot get Xcode to allow me to pass the arrays.

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
    
}


I don't know what I'm doing wrong. I've done this before without any issues, but Xcode is now giving me issues.
I have Code::Blocks for my Mac, but the port is unstable and gives me compiler errors too often to use it for little projects like this.

If anyone could just help me out with the function call, I'd be very grateful.
The error I get is this.
error: cannot convert ‘double*’ to ‘int*’ for argument ‘7’ to ‘void loadFile(std::istream&, std::string*, double*, double*, double*, double*, int*, int&)’


I inspected my code and I declared 'vol' as a double but tried to pass it as an int, exactly what you said.
Now, if only I could get Xcode to give me the feedback that it apparently gave you.
Thank for your help!
Topic archived. No new replies allowed.