test
This commit is contained in:
parent
3972d51eff
commit
6a9d07cee3
@ -23,7 +23,7 @@ struct car* add_car(struct car* first,const char* target) {
|
|||||||
void print_train(struct car* first) {
|
void print_train(struct car* first) {
|
||||||
struct car* this = first;
|
struct car* this = first;
|
||||||
while(this != NULL){
|
while(this != NULL){
|
||||||
printf("%s",this->value);
|
printf("%s->",this->value);
|
||||||
this = this->next;
|
this = this->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
if(strcmp(this->value, target) == 0){
|
if(strcmp(this->value, target) == 0){
|
||||||
//strcpy(this->value,this->next->value);
|
//strcpy(this->value,this->next->value);
|
||||||
//this->next=NULL;
|
//this->next=NULL;
|
||||||
strucat car* tmp = this->next;
|
struct car* tmp = this->next;
|
||||||
free(this);
|
free(this);
|
||||||
//free(this->next);
|
//free(this->next);
|
||||||
return tmp;
|
return tmp;
|
||||||
|
Loading…
Reference in New Issue
Block a user