123
This commit is contained in:
parent
51e095e6c0
commit
67305af891
@ -1,5 +1,7 @@
|
||||
#include "a_train.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
struct car* add_car(struct car* first,const char* target) {
|
||||
struct car* newcar = calloc(1,sizeof(struct car));
|
||||
@ -13,10 +15,10 @@ struct car* add_car(struct car* first,const char* target) {
|
||||
}
|
||||
|
||||
void print_train(struct car* first) {
|
||||
while(first != NULL)(
|
||||
while(first != NULL){
|
||||
printf("%s", first->value);
|
||||
first->value = first->next
|
||||
)
|
||||
first = first->next;
|
||||
}
|
||||
}
|
||||
|
||||
void cancel_train(struct car* first) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user