How can I assign a location to a pointer from a pointer within a struct.
if n->left points to "node a;"
how can I make node pointer ptr point to node a?
if you get my drift.
also if i have made a node.
how can i make an existing pointer within a nodeCode:node nn; nn.val = 5;
which i have a pointer to point to the new node
doesnt seem to work. Or is this because the function is destroying the new node nn when it finishes?Code:int blah (node *mega) { node nn; nn.val = 5; mega->left = nn; return 0; }



LinkBack URL
About LinkBacks



.