diff --git a/cv6/a_station.c b/cv6/a_station.c index 2d5fb25..f76fdb0 100644 --- a/cv6/a_station.c +++ b/cv6/a_station.c @@ -57,7 +57,15 @@ int index = select_track(station, target); } int count_targets(struct station* station){ - return 0; + int count = 0; + for (int i = 0; i < station->track_count; ++i) { + struct car* current = station->tracks[i]; + while (current) { + ++count; + current = current->next; + } + } + return count; } int count_capacity(struct station* station){