/** Copyright and version declaration section of the Program * Copyright (c) 2013, student * All rightsreserved from computer College of Yantai University. * file name: score. cpp * Author: Li Yang * Completion Date: July 15, March 13, 2013 * version: v1.0 * input Description: none * Problem description: File Read * output: none */# include <fstream> # include <iostream> using namespace std; struct Score {char num [13]; char name [14]; int cpp; int math; int english ;}; int main () {int I, n = 0; Score [300]; ifstream infile ("score.txt", ios: in); if (! Infile) {cerr <"open error! "<Endl; exit (1) ;}while (! Infile. eof () {infile> score [n]. num> score [n]. name> score [n]. cpp> score [n]. math> score [n]. english; ++ n;} infile. close (); for (I = 0; I <n-1; I ++) {cout <score [I]. num <"" <score [I]. name <"" <score [I]. cpp <"" <score [I]. math <"<score [I]. english <endl;} return 0 ;}