diff --git a/cv4/a_train.c b/cv4/a_train.c index df08cb0..5590ad3 100644 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -1,12 +1,8 @@ #include -#define SIZE 50 +#include"a_train.h" + -struct car -{ - char value[SIZE]; // Cieľová stanica - struct car* next; // Ďaľší záznam, môže byť NULL -}; struct car* add_car(struct car* first,const char* target) { @@ -94,18 +90,6 @@ struct car* clear_train(struct car* first, const char* target) return first; } -int main() - { - struct car* train = NULL; - train = add_car(train,"Presov"); - train = add_car(train,"Bratislava"); - train = add_car(train,"Levoca"); - train = add_car(train,"Spiska Nova Ves"); - print_train(train); - clear_train(train,"Levoca"); - print_train(train); - cancel_train(train); - return 0; -} +