When I try to use the erase function within vector to erase a 'list', I get a segmentation fault. I am using clang++, c++11. The line of code I am struggling with is:
studentEntries.erase(std::find(studentEntries.begin(), studentEntries.end(), it));
studentEntries is a vector of lists of strings. ie:
std::vector<std::list<std::string>> studentEntries;
If more context would be helpful I also uploaded my project to pastebin (57 lines total). The problem is on line 27.
Thank you all so much for your help!!
Aucun commentaire:
Enregistrer un commentaire