(this program adds a node at the bottom of a list using virtual memory)
I have a problem running my code on a (Unix) SUN machine, it compiles fine but with this part of the code i got a "Segmentation Fault". Works fine on my PC if i run it with BORLAND C.
This is part of the code i think is giving trouble!
void add( struct node *new ){
if( head == NULL )
head = new;
end->next = new;/*here*/
new->next = NULL;
end = new;
}
I have a problem running my code on a (Unix) SUN machine, it compiles fine but with this part of the code i got a "Segmentation Fault". Works fine on my PC if i run it with BORLAND C.
This is part of the code i think is giving trouble!
void add( struct node *new ){
if( head == NULL )
head = new;
end->next = new;/*here*/
new->next = NULL;
end = new;
}