This commit is contained in:
Kamil Gejdoš 2026-04-23 12:12:55 +00:00
parent 0f96d71888
commit 2ce92e5a29

View File

@ -10,6 +10,17 @@ struct station* create_station(){
}
void destroy_station(struct station* station){
for (int i = 0; i < station -> track_count; i++){
struct car* temp = station -> tracks[i];
while (temp != NULL) {
struct car* temp2 = temp;
temp = temp -> next;
free (temp2);
}
}
free(station);
}
int select_track(struct station* station, const char* target){