例如:
"I don't like these "double" quotes"
Run Code Online (Sandbox Code Playgroud)
我想要输出
I don't like these double quotes
Run Code Online (Sandbox Code Playgroud) 编辑:使用c ++编写代码.
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;
}
}
}
Run Code Online (Sandbox Code Playgroud)
添加其他我很抱歉我有点忘了复制代码的那部分,是的,它是出于学习目的.我不熟悉使用c ++进行编码,可能会对此感到遗憾.
对于这行代码
this-> start-> value == x
我不确定你的意思或你认为它的去向,是的,链表中有节点,并假设它始终总是有至少1个节点.