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

View File

@ -20,11 +20,12 @@ 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{
while(this != NULL){ if(first != NULL){
while(this != NULL){
printf("%s\n", this->value); printf("%s\n", this->value);
this = this->next; this = this->next;
} }