add
This commit is contained in:
parent
5202a7ff7f
commit
6e024061ef
@ -13,10 +13,10 @@ struct car* add_car(struct car* first,const char* target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(first == NULL){
|
if(first == NULL){
|
||||||
|
strcpy(newcar->value, target);
|
||||||
return newcar;
|
return newcar;
|
||||||
}
|
}
|
||||||
strcpy(newcar->value, target);
|
strcpy(newcar->value,target);
|
||||||
|
|
||||||
struct car *this = first;
|
struct car *this = first;
|
||||||
while(this->next != NULL){
|
while(this->next != NULL){
|
||||||
this = this->next;
|
this = this->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user