This commit is contained in:
Maryna Kravtsova 2020-11-02 11:37:31 +01:00
parent fb622e0d22
commit cb21f01ac7

View File

@ -20,10 +20,11 @@ struct car* add_car(struct car* first,const char* target) {
void print_train(struct car* first) { void print_train(struct car* first) {
struct car* this = first; struct car* this = first;
if(first == NULL){ /*if(first == NULL){
exit(0); exit(0);
} }*/
else{ //else{
if(first != NULL){
while(this != NULL){ while(this != NULL){
printf("%s\n", this->value); printf("%s\n", this->value);
this = this->next; this = this->next;