Compare commits

..

No commits in common. "2314d074b49da55df5df1fe2c98172e5366f0766" and "4fde774336c7639463c880c32d50f622a352e782" have entirely different histories.

2 changed files with 11 additions and 9 deletions

View File

@ -4,11 +4,13 @@
#include <string.h> #include <string.h>
int main(void){ /*int main(void){
printf("Zadajte zoznam cieľových staníc a počet cestujúcich.\n"); printf("Zadajte zoznam cieľových staníc a počet cestujúcich.\n");
printf("Zoznam zakončite prázdnym riadkom.\n"); printf("Zoznam zakončite prázdnym riadkom.\n");
add_car;
return 0; return 0;
} }*/
struct car* add_car(struct car* first,const char* target) { struct car* add_car(struct car* first,const char* target) {
struct car* newcar = calloc(1,sizeof(struct car)); struct car* newcar = calloc(1,sizeof(struct car));
@ -41,9 +43,9 @@ void cancel_train(struct car* first) {
free(temp); free(temp);
temp=next; temp=next;
} }
}
first=NULL; first=NULL;
} }
}
//Funkcia na zrušenie spojkového zoznamu môže pracovať rekurzívne: //Funkcia na zrušenie spojkového zoznamu môže pracovať rekurzívne:
//Ak je zoznam prázdny, potom rušenie končí. //Ak je zoznam prázdny, potom rušenie končí.

Binary file not shown.