refresh
This commit is contained in:
parent
b2212e159b
commit
c72ffadff8
@ -1,5 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include "stdlib.h"
|
||||
#include <string.h>
|
||||
#define SIZE 100
|
||||
#include "a_station.h"
|
||||
|
||||
struct station {
|
||||
struct car** tracks;
|
||||
@ -13,6 +16,7 @@ struct car {
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
31
du5/a_station.h
Normal file
31
du5/a_station.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef A_STATION_H
|
||||
#define A_STATION_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SIZE 100
|
||||
#define STATION_SIZE 10
|
||||
|
||||
struct car {
|
||||
int capacity;
|
||||
char value[SIZE];
|
||||
struct car* next;
|
||||
};
|
||||
|
||||
struct station {
|
||||
struct car** tracks;
|
||||
int track_count;
|
||||
};
|
||||
|
||||
struct station* create_station();
|
||||
void destroy_station(struct station* s);
|
||||
int select_track(struct station* s, const char* target);
|
||||
void add_target_capacity(struct station* s, const char* target, int capacity);
|
||||
struct car* find_target(struct station* s, const char* target);
|
||||
int get_total_targets(struct station* s);
|
||||
int get_total_capacity(struct station* s);
|
||||
void print_station(struct station* s);
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user