Update cv4/a_train.c
This commit is contained in:
parent
b19bc58d10
commit
76864bd125
@ -1,11 +1,12 @@
|
||||
#include <stdio.h>
|
||||
#include"a_train.h"
|
||||
|
||||
/////@
|
||||
|
||||
|
||||
|
||||
struct car* add_car(struct car* first,const char* target)
|
||||
{
|
||||
struct car* ret = first;
|
||||
struct car* nc=(struct car*) malloc(sizeof(struct car));
|
||||
strcpy(nc->value, target);
|
||||
nc->next=NULL;
|
||||
@ -17,7 +18,7 @@ struct car* add_car(struct car* first,const char* target)
|
||||
first=first->next;
|
||||
}
|
||||
first->next=nc;
|
||||
return first;
|
||||
return ret;
|
||||
}
|
||||
|
||||
first=nc;
|
||||
|
Loading…
Reference in New Issue
Block a user