Update cv4/a_train.c
This commit is contained in:
parent
64d9d7bfa3
commit
6179afeebe
@ -1,12 +1,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#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)
|
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;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user