I have this code to store data from an array;

Code:
double main()
{
	ifstream data;
	double n[N];
	string filename;
	int count(0);

	cout << "What is the filename where the data is located?" << endl;
	cin >> filename;

	data.open(filename.c_str());
	
	while(count < (N-1) && !data.eof())
	{
		data >> n[count];
		cout << n[count];
		count++;
	}
	return 0;
}

My question is, how do I make this callable from another function so that the other function recieves the data uin the array?

Any help would be much appreciated.