The reason why you must use the reference symbol above might become clear when you learn what a pointer actually is.
A pointer is just a number. You could turn your pointer into an unsigned int type and use this instead. A pointer type in c/c++ is just to let you and the compiler know that the number contained is to be treated as a memory address. So, if you dont pass by reference, then all you are doing is changing the numeric value of header within the function call and nothing else.
Code:
void insertOrder (unsigned int header, const T& item){
header=new dnode<T>(item);
}
So, I hope this explains why you must use this code instead. Pass by reference so the number returned by the new function actually is stored in the pointer you pass to the function.
Code:
void insertOrder (dnode<T>* &header, const T& item){
header=new dnode<T>(item);
}