hi there,
i need to create a function that reads a series of numbers from a file and returns to the main function the mean of those numbers. I am having trouble with the syntax of array parameters and arguments (i don't know how to call the function if it is an array). I need some help with my syntax. Here is my code so far, very unfinished. Can someone point me into the right direction? I know i have to use a loop statement in there somewhere but i don't know which one.
Help would be great
#include<iostream>
using namespace std;
#include <fstream>
double meanArray(double N1[],double average);
int main()
{
double average
double fileNumbers[]
system("TITLE Third Project");
system("COLOR 47");
mymean = meanArray(fileNumbers, average)
cout<<"\n";
return 0;
}
double meanArray(double N1[],double average)
{
ifstream infile;
infile.open("DataFile.txt");