diff --git a/cv4/a_train.h b/cv4/a_train.h index 7faa267..6ee9e21 100644 --- a/cv4/a_train.h +++ b/cv4/a_train.h @@ -1,7 +1,23 @@ +#include +#include #ifndef TRAIN_H #define TRAIN_H #define SIZE 100 +/** + * Jeden vozen vlaku + */ +struct car { + /** + * Nazov cielovej stanice + */ + char value[SIZE]; + /** + * Smenik na dalsi vozen + */ + struct car* next; +}; + struct car* add_car(struct car* first, const char* target) { // Vytvorenie noveho vozna @@ -29,15 +45,7 @@ struct car* add_car(struct car* first, const char* target) { // Pridanie noveho vozna na koniec temp->next = new_car; return first; -}; - -/** - * Prida vozen na koniec vlaku. - * - * @arg nazov cielovej stanice, ktory sa ma priradit novemu voznu. - * @return smernik na zaciatok vlaku. - */ -struct car* add_car(struct car* first,const char* target); +} /**