I have a text file that looks like this:
January 35 45
February 45 55
etc...
I am trying to read through the file and add each month to a string array and then each following integer into a 2-dimensional array.
I have a months[] array and a temps[][] array.
I'm trying something like this
int size = 0;
while(!file.eof()) {
file >> months[size];
size++;
}
I can't figure out how to add the two integers into the int array...
This is for a class, surprise surprise, the requirements are specifically to read the data from the file and insert the month into an array and the two following integers into the two-dimensional array.
We have not gone over structures or vectors yet.