From 7d8b479f1c91d2df39fdbefddcedba98f3d7f1ef Mon Sep 17 00:00:00 2001 From: vj586da Date: Thu, 4 Nov 2021 20:12:23 +0100 Subject: [PATCH] second commit --- cv4/a_train.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index fdc6d4b..290ed95 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -1,8 +1,10 @@ #include "a_train.h" #include +#include +#include struct car* add_car(struct car* first,const char* target) { - strucr car* new_car = (struct car*)calloc(1,sizeof(struct car)); + struct car* new_car = (struct car*)calloc(1,sizeof(struct car)); strcpy(new_car->value, target); new_car->next = NULL; if (first == NULL){ @@ -39,7 +41,7 @@ void cancel_train(struct car* first) { struct car* clear_train(struct car* first, const char* target) { struct car* this = first; while( this->next->next != NULL){ - if(strcmp(this->next->value, target, SIZE) == 0){ + if(strcmp(this->value, target) == 0){ this->next == this->next->next; free(this); }