Given four files named winter2003.txt , spring2003.txt , summer2003.txt , fall2003.txt , define four ifstream objects named wntr , sprg , sumr , and fall , and use them, respectively, to open the four files for reading.

LANGUAGE: C++

CHALLENGE:

Given four files named winter2003.txt , spring2003.txt , summer2003.txt , fall2003.txt , define four ifstream objects named wntr , sprg , sumr , and fall , and use them, respectively, to open the four files for reading.

SOLUTION:


ifstream wntr, sprg, sumr, fall;
wntr.open("winter2003.txt");
sprg.open("spring2003.txt");
sumr.open("summer2003.txt");
fall.open("fall2003.txt");