EDITED: using c++ to code.
void circularList::deleteNode(int x)
{
node *current;
node *temp;
current = this->start;
while(current->next != this->start)
{
if(current->next->value == x)
{
temp = current->next;
current->next = current->next->next;
delete current->next;
}
else{
current = current->next;
}
}
}
Added the else i'm sorry i kinda forgot to copy that part of the code and yes it is for learning purposes. I'm new to coding with c++ and probably come off as a noob sorry about that.
Also as for this line of code
this->start->value == x
im not sure what you mean by it or where you think it goes, yes there are nodes in the linked list and assume that it will always have at lease 1 node all the time.