Get cap
This commit is contained in:
parent
f7558fb7bf
commit
345d2a79e5
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user