how do i read file into array. size of the number in file is not fix, code should be able to read any size of numbers. and i have to make a function to read in file into array.this is what i got so far i forgot how to call fucntion in main file
//functions
void ReadList ( int Array [])
{
ifstream myfile;
myfile.open ( "data.txt");
for (int i=0; i < 100; i++)
{
myfile >> Array [i];
}
myfile.close();
}
void Average ( int Array [], int n, int &Avg, int &Avg_pos, int &Avg_neg)
{
Avg = 0;
Avg_pos = 0;
Avg_neg = 0;
int count_pos = 0;
int count_neg = 0;