OK then, I'll give you the simpler suggestion. (Don't worry, I won't do your work for you.) It doesn't have the same coolness factor, but it is just as effective.
Since you have several options that require you to parse the file
once for each option, that means you will have to repeat a lot of code to do basically the same thing in your already very large, hard to read (because it is so big) main() function.
What I suggest that you do is make another function that handles all the parsing of the file. All you have to do is tell it which field number you are interested in, and the function will search through the file and compute the minimum, maximum, and average for the selected field.
You may also want to control which subset of records are accessed based upon the date. For example, above in my example I only accessed records where field 0 contained the date "07/01/1999".
So, given those options (pronounced arg-u-ments

) we can write a function prototype:
void read_file(
ifstream& file, // The open and ready-to-read csv data file
string targetdate, // The date we are interested in (see note below)
int fieldindex, // The index of the field we are interested in
double& min, // Where to put the minimum of the indexed field
double& max, // Where to put the maximum
double& avg // Where to put the average
);
You can then, inside the function, gather all the required information (min,max,avg) and return them via the reference arguments. You'll have to fill in the body of the function. (Don't forget to reset the file at the end of the function.)
Now, to find the daily min/max temp for a specific day, you can just say:
string targetdate = "01/07/1999"; // whatever the target day is
double min_temp, max_temp, avg_temp;
read_file( weatherfile, targetdate, min_temp, max_temp, avg_temp );
cout << targetdate << ": ";
cout << setw(10) << setprecision(2) << min_temp;
cout << setw(10) << setprecision(2) << max_temp;
note
This seems a fairly intense project. Is the data file you posted the
entire datafile, or are other days involved (like "01/08/1999")?
If it is just one day you can forget all that stuff about the target date.
But if it is more than one day then you'll have to either loop on the date or ask the user which date he is interested in.
The point
The whole reason I suggest this is to break things up into smaller, individual things. When you can concentrate on doing
one thing (or less than three things) right at a time, and not have to worry about anything else, then it is much easier to see how your program works and fits together.
The main() function should direct the show, but avoid doing all the dirty work. Make sense?
Hope this helps.