From 6e024061efcd9563bcc83883b08123b6a9d1dcb4 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 2 Nov 2020 15:45:13 +0100 Subject: [PATCH] add --- 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 bffcdd8..c650eea 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -13,10 +13,10 @@ struct car* add_car(struct car* first,const char* target) { } if(first == NULL){ + strcpy(newcar->value, target); return newcar; } - strcpy(newcar->value, target); - + strcpy(newcar->value,target); struct car *this = first; while(this->next != NULL){ this = this->next;