diff --git a/du5/a_station.c b/du5/a_station.c index 2ba5b92..379e73f 100644 --- a/du5/a_station.c +++ b/du5/a_station.c @@ -77,6 +77,16 @@ void add_target_capacity(struct station* station,const char* target, int capacit } int get_target_capacity(struct station* station,const char* target){ + struct car* ptr = *station->tracks; + while (ptr) + { if(strcmp(ptr->value, target) == 0){ + return ptr->capacity; + + } + ptr = ptr->next; + + /* code */ + } return 0; }