writing to a 2-D array from an infile

i need to take info from a file, then put it into an array. my whole program is complete except the actual storage part.

// function getdata draws data from a file containing the high and
// low temperatures for each month in Akins, Ohio
int getdata(double temperature [12][2])
{
ifstream akinsoklahoma;
akinsoklahoma.open("akinsoklahoma.txt");

for (double i = 0; i < 12; i++)
temperature[i] = 0;
for (double j = 0; j < 2; j++)
temperature[j] = 0;

akinsoklahoma.close();
return 0;
}

i have no clue what i'm doing, and could really use the help. the array is 12 lines long, with two numbers on each line, and so is the data in the file i'm using
Last edited on
if you need anymore info, please tell me. i've been searching the web on how to store the info into the array but i'm not finding anything useful/not understanding it. i'm very new to this!
Topic archived. No new replies allowed.