主题:删除一个表(新手)
下面是2种方法`,到底有什么本质的区别??
void delete( list L )
{
struct Node * p;
p = L -> next;
while( p != NULL){
free( p );
p = p -> next;
}
}
void delete( list L )
{
struct Node * p;
struct Node * tmp;
p = L -> next;
while( p != NULL){
tmp = p-> next;
free ( p );
p = tmp;
}
}
void delete( list L )
{
struct Node * p;
p = L -> next;
while( p != NULL){
free( p );
p = p -> next;
}
}
void delete( list L )
{
struct Node * p;
struct Node * tmp;
p = L -> next;
while( p != NULL){
tmp = p-> next;
free ( p );
p = tmp;
}
}