#include "a_train.h" #include #include #include // Testovaci subor pre vlak int main(){ struct car* train = NULL; /* int c=0; printf("Zadajte nazov stanice a pocet cestujucich. \n Ukoncite prazdnym riadkom \n"); char i[100]; while (strcmp(i, "\n") != 0) { c++; fgets(i, 100, stdin); if(c%2 != 0){ train = add_car(train,i); } printf("%s \n",i); }*/ //struct car* train = NULL; train = add_car(train,"Presov"); train = add_car(train,"Levoca"); train = add_car(train,"Bratislava"); train = add_car(train,"Spiska Nova Ves"); print_train(train); clear_train(train,"Levoca"); print_train(train); cancel_train(train); return 0; }