This commit is contained in:
Valér Jakubčo 2021-11-05 08:17:02 +01:00
parent 3972d51eff
commit 6a9d07cee3

View File

@ -23,7 +23,7 @@ struct car* add_car(struct car* first,const char* target) {
void print_train(struct car* first) {
struct car* this = first;
while(this != NULL){
printf("%s",this->value);
printf("%s->",this->value);
this = this->next;
}
@ -55,7 +55,7 @@ struct car* clear_train(struct car* first, const char* target) {
if(strcmp(this->value, target) == 0){
//strcpy(this->value,this->next->value);
//this->next=NULL;
strucat car* tmp = this->next;
struct car* tmp = this->next;
free(this);
//free(this->next);
return tmp;