From 7110825154250f807502411bda5d142ab6e290a9 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Wed, 4 Nov 2020 22:38:27 +0100 Subject: [PATCH] clear --- cv5/a_train.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index 2e3b70d..cdfe297 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -28,7 +28,7 @@ struct car* add_car(struct car* first,const char* target) { void print_train(struct car* first) { for(struct car* this = first; this != NULL; this = this->next){ - printf("%s\n", this->value); + printf("%s ", this->value); } } @@ -84,7 +84,7 @@ struct car* clear_train(struct car* first, const char* target) { this = this->next; } - + int x = strcmp(this->value, target); if(x == 0){ free(this->next);