24 lines
471 B
C
24 lines
471 B
C
|
#include "a_train.h"
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main() {
|
||
|
struct car* train = NULL;
|
||
|
|
||
|
train = add_car(train, "Bratislava");
|
||
|
train = add_car(train, "Kosice");
|
||
|
train = add_car(train, "Zilina");
|
||
|
|
||
|
printf("Vsetky stanice vo vlaku:\n");
|
||
|
print_train(train);
|
||
|
|
||
|
printf("\nVyradujeme stanicu 'Kosice':\n");
|
||
|
train = clear_train(train, "Kosice");
|
||
|
print_train(train);
|
||
|
|
||
|
printf("\nZrusenie celeho vlaku:\n");
|
||
|
cancel_train(train);
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|