I believe the error is occuring within the int sieveEratosthenes(LList* p, int lstSize) function and it's specifically occuring at the node->setPrime(false); call.

//Class Declaration class ListNode { friend class LList; public: ListNode(int item = 0, bool pVal = false, ListNode* link=nullptr); int getItem() { return item_; } bool getPrime() { return prime_; } void setPrime(bool p) { prime_ = p; } ListNode* getNext() { return link_; } private: int item_; bool prime_; ListNode *link_; }; //function int sieveEratosthenes(LList* p, int lstSize) { //locals ListNode* node; bool pTest = false; //Populate the List for(int j = 2; j < lstSize; j++) //Starts filling the list at 2 { p->append(j, true); //Values are not considered prime until tested cout << j << " has been added to the list." << endl; } //Algorithm for(int i = 2; i < lstSize; i++) { node = p->_find(i - 2); //i - 2, sets position in list equal to value being evaluated pTest = node->getPrime(); if(pTest) //if node value is prime { for(int j = 2 * i; j <= lstSize; j += i) { node = p->_find(j-2); node->setPrime(false); } } } return 0; }