title: Finding and outputting path to a unique node in C++?
body: <p>Say we have the following structure:</p>
  
  <pre><code>struct Tree {
    string id;
    int numof_children;
    Tree *children[5];
  };
  </code></pre>
  
  <p>...where each id is unique (can only appear once in tree), how can I find the path to an id in this type of tree and output it?</p>
  
  <p>I know how to reach the node and check if it exists, but I can't figure out how to output the proper path.</p>
  
  <p>Restrictions: No vectors/lists/stack data types may be used. Recursion only.
  Recommendations: Function look(ATree *t, string &amp;id) should have the return type of a string.</p>
  
  <p>Is there a general structure of recursion that I can follow?</p>