clear
This commit is contained in:
parent
b9c56da641
commit
7110825154
@ -28,7 +28,7 @@ struct car* add_car(struct car* first,const char* target) {
|
||||
|
||||
void print_train(struct car* first) {
|
||||
for(struct car* this = first; this != NULL; this = this->next){
|
||||
printf("%s\n", this->value);
|
||||
printf("%s ", this->value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
this = this->next;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int x = strcmp(this->value, target);
|
||||
if(x == 0){
|
||||
free(this->next);
|
||||
|
Loading…
Reference in New Issue
Block a user