Hello,
I am pulling in lines from a file. I am however getting one copy of the last record at the end...any suggestions
Code:fstream infile("hw5.data",ios::in); info main_struct; string line_string; string fips; string d_name; string r_code; int d_pop; int sd_enrol; int st_need; while(infile) { getline(infile,line_string,'\n'); parse_string(line_string,fips,d_name,r_code,d_pop,sd_enrol,st_need); fips = ""; d_name = ""; r_code = ""; d_pop; sd_enrol; st_need; cout << endl << endl << endl; }



LinkBack URL
About LinkBacks


