2019-11-04 09:36:45 +00:00
|
|
|
#include "a_train.h"
|
|
|
|
#include <stdio.h>
|
2019-11-30 19:28:04 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2019-11-04 09:36:45 +00:00
|
|
|
|
|
|
|
// Testovaci subor pre vlak
|
|
|
|
int main(){
|
2019-11-30 19:28:04 +00:00
|
|
|
|
2019-11-04 09:36:45 +00:00
|
|
|
struct car* train = NULL;
|
2019-11-30 19:28:04 +00:00
|
|
|
/* 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;
|
2019-11-04 09:36:45 +00:00
|
|
|
train = add_car(train,"Presov");
|
|
|
|
train = add_car(train,"Levoca");
|
2019-11-30 19:28:04 +00:00
|
|
|
train = add_car(train,"Bratislava");
|
2019-11-04 09:36:45 +00:00
|
|
|
train = add_car(train,"Spiska Nova Ves");
|
|
|
|
print_train(train);
|
|
|
|
clear_train(train,"Levoca");
|
|
|
|
print_train(train);
|
|
|
|
cancel_train(train);
|
|
|
|
return 0;
|
|
|
|
}
|