From 0d8ada0d9d5b2ca5f3aa92c786be4c888d1f16b9 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 26 Oct 2020 19:29:25 +0100 Subject: [PATCH] train --- cv5/a_train.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cv5/a_train.c b/cv5/a_train.c index cc680a7..a868a77 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -7,6 +7,7 @@ struct car* add_car(struct car* first,const char* target) { struct car* newcar = calloc(1, sizeof(struct car)); strcpy(newcar->value, target); + newcar->next = first; if(first == NULL){ return newcar; }