title: A parse tree builder; Stacks and pointers
body: <p>My task, is to implement a build a parse tree for a very simplified language.</p>
  
  <p>Part of this entails creating a iterator to insert nodes and preform a Depth First Search without using recursion </p>
  
  <p>This requires creating a stack and pushing the current state of the iterator onto the stack. </p>
  
  <p>this state includes the parent node and the index of the child which being visited at the moment.</p>
  
  <p>Since I am still inexperienced using C++. I have being do some research of various features of C++. With regards to  stacks, I haven't be able to find example/information with complex a structure. </p>
  
  <p>I would appreciate any hints, suggestions and pointers (no pun intended )  on how to implement this.</p>
  
  <p><strong>Edit:</strong>
  I felt the need to add additional information about the nodes</p>
  
  <p>in my node class , I have following initialization variable/s:</p>
  
  <pre><code> node** children; //This create a array of pointers to children 
  </code></pre>
  
  <p>My custom iterator is not build using templates  </p>