How can I write equivalent to this in pascal?
void push(struct node **head, struct node **member)
{
(*head)->next = *member;
(*member)->prev = *head;
(*member)->next = NULL;
*head = *member;
}
I've tried something like this:
procedure Push(head : nodeptr; prev : nodeptr; sym : nodeptr);
begin
prev^.prev := sym;
sym^.prev := prev;
sym^.next := nil;
prev := sym;
end;
In fact, I want to know how to do equivalent to this in pascal: *head = *member;
where both are of struct node**
type, 2D-pointer.
EDIT: I've added my pascal compiler. It might be relevant.
From this tutorial on pascal pointer to pointer, you could do something like this