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;