15%
This commit is contained in:
parent
0bfd36a418
commit
e70abbc8cd
@ -17,10 +17,8 @@ struct car* add_car(struct car* first,const char* target) {
|
|||||||
struct car* this=first;
|
struct car* this=first;
|
||||||
int length=0;
|
int length=0;
|
||||||
while(this!=NULL){
|
while(this!=NULL){
|
||||||
if(this->next!=NULL){
|
|
||||||
this=this->next;
|
this=this->next;
|
||||||
this->next = newcar;
|
this->next = newcar;
|
||||||
}
|
|
||||||
length++;
|
length++;
|
||||||
}
|
}
|
||||||
strcpy(newcar->value, target);
|
strcpy(newcar->value, target);
|
||||||
|
Loading…
Reference in New Issue
Block a user