void checker(int min, int max, string file) {
ifstream myfile;
string line;
vector<int> numlist;
myfile.open(file);
while (!myfile.eof()) {
if (!getline(myfile, line)) {
break;
} else if(line!="") {
vector<string> chap = split_string(line);
int chapter = str2int(chap[2]);
numlist.push_back(chapter);
}
}
//other code cut out because it was not important
I just turned in this code with my assignment and it worked! chap[2] is the third element of a line from a file that was read in. There are many lines in the file that were (with help from other functions and classes) turned into their own vector. But the third element of each vector (a line read in from a file) was a number which was the chapter number (chap[2]). Now this proves that chap[2] WAS NOT the culprit. Here is a sample of a line from the file: short@1@10@In inheritance, what is the technical term for the "parent" class?@base class