add
This commit is contained in:
parent
df034f6c6d
commit
61443227a5
@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -43,9 +44,10 @@ void cancel_train(struct car* first) {
|
||||
return;
|
||||
}
|
||||
else if(first->next != NULL){
|
||||
cancel_train(first->next);
|
||||
first->next = NULL;
|
||||
struct car* help = first->next;
|
||||
free(first);
|
||||
cancel_train(help);
|
||||
//first->next = NULL;
|
||||
}
|
||||
else if(first->next == NULL){
|
||||
free(first);
|
||||
|
Loading…
Reference in New Issue
Block a user