void print_preorder ( Node * n)
{
Node * np;
if ( n == NULL ) return;
cout << (n -> ival());
// non-pointer data
np = n -> next;
while (np != NULL) {
print_preorder ( np->pval() );
np = np->next;
}
}
Recursive Preorder for Method 1
Nested List Implementation