diff --git a/du5/a_station.c b/du5/a_station.c index 4727626..1ce6936 100644 --- a/du5/a_station.c +++ b/du5/a_station.c @@ -72,8 +72,17 @@ int count_targets(struct station* station){ if(station == NULL || station->tracks == NULL){ return 0; } -return 0; + int total = 0; + for(int i = 0; itrack_count; i++){ + struct car* ptr = station->tracks[i]; + while(ptr){ + total++; + ptr = ptr->next; + } + +} +return total; } int count_capacity(struct station* station){