Prva verzia
This commit is contained in:
parent
a8801cf422
commit
007f030c33
10
a_station.c
10
a_station.c
@ -10,6 +10,16 @@ struct station* create_station(){
|
||||
}
|
||||
|
||||
void destroy_station(struct station* station){
|
||||
for (int i = 0 ; i< station->capacity; i++){
|
||||
struct car* start = station->tracks[i];
|
||||
struct car* this = start;
|
||||
while(this != NULL){
|
||||
next = this->next;
|
||||
free(this);
|
||||
this=next;
|
||||
}
|
||||
free(station->tracks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
int select_track(struct station* station, const char* target){
|
||||
|
Loading…
Reference in New Issue
Block a user