I have this code:
while (current->next->data <= temp->data && current->next != nullptr)
{
current = current->next;
}
when I run it i get the error:
Exception thrown: read access violation. current->next was nullptr.
I believe I should not be receiving this error because it is the exact thing I check for; I am new to this, is there something I am doing wrong?