template <class type> void append(node<type>** l,const type& elem){ if(*l==NULL) insert_first(&*l,elem); else { node<type>*temp=*l; node<type> *Q=new node<type>; Q->data=elem; while(temp->next!=NULL) { temp=temp->next; } temp->next=Q; Q->prev=temp; }}
int main(int argc, char** argv){ node<int>* q=NULL;//Create Empty Pointer that Will point to the Head of the List insert_first(&q,2); append(&q,5); //Here is the test print_l(q); system("PAUSE"); return 0;}