diff --git a/cv4/a_train.c b/cv4/a_train.c index f5fa973..1f4cbed 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -73,6 +73,11 @@ struct car* clear_train(struct car* first, const char* target) { else { this = this->next; } + } + if(strcmp(this->next->value,target) == 0{ + free(this->next); + this->next=NULL; + return this; } return first; }