while (!ifile.eof()){
dataToAdd = new proceedingsBook;
ifile>>line;
dataToAdd->setPublisher(removeTags(line, "publisher"));
ifile>>line;
dataToAdd->setIsbn(atoi(removeTags(line, "ISBN").c_str()));
ifile>>line;
dataToAdd->setTitle(removeTags(line, "Title"));
ifile>>line;
dataToAdd->setEditor(removeTags(line, "Editor"));
ifile>>line;
dataToAdd->setDate(removeTags(line, "ConferenceDate"));
ifile>>line;
dataToAdd->setAuthor(removeTags(line, "Author"));
list.addToList(dataToAdd);
list.find(*dataToAdd); //locate the data that has just been input into list
odata = list.getCurrent(); //write data from the list into output data
cout<<"**********************************NEW PUBLICATION ADDED******************** "<<endl;
cout<<"Publisher: "<<odata->getPublisher()<<endl;
cout<<"ISBN: "<<odata->getIsbn()<<endl;
cout<<"Title: "<<odata->getTitle()<<endl;
cout<<"Editor: "<<odata->getEditor()<<endl;
cout<<"Date: "<<odata->getDate()<<endl;
cout<<"Author: "<<odata->getAuthor()<<endl;
}
However it appears that the same first record is being read in again and again as the output printing the added publication prints the same one over and over again.
How can i make it go through the file properly and read i all the data?