Hi
How would I write a function that reads numbers from a txt file into an array. For example a function to call this code below:
float gradeData[12] = {0.0F};
int i; // loop counter
ifstream myfile ("rainfall.txt");
if( myfile.is_open() )
{
i = 0;
while( i < 12 && myfile >> gradeData[i] )
i++;
}