That while statement on line 13 is incorrect because eof() doesn't work like that. Instead, code it something like this Help with Code Tags C++ Syntax (Toggle Plain Text) string line;while(getline(infile, line) ){ // now split this string into individual parts for the structure} string line; while(getline(infile, line) ) { // now split this string into individual parts for the structure }
string line;while(getline(infile, line) ){ // now split this string into individual parts for the structure}