title: Compilier not Entering Functions Properly
body: <p>I am trying to write a program that calls a custom function.  Unfortunately, once it enters the function, it ceases to print what I told it to and gets stuck indefinitely.  (I run a mac 10.9, and the newest Xcode)</p>
  
  <p>The two functions are:</p>
  
  <pre><code>int main(void)
  {
  
      string filePath;
      treeNode* root;
      int words;
  
      //filePath = getFileName();
  
      cout &lt;&lt; "Choosing pathway.\n";
      root = readIn(words, "/Users/Noah/Desktop/SmallFile.txt");
  
      cout &lt;&lt; "File read.\n";
      root-&gt;printInOrder(root);
  
  }
  </code></pre>
  
  <p>and: </p>
  
  <pre><code>treeNode* readIn (int&amp; count, string file)
  {
      cout &lt;&lt; "Here.  ";
      treeNode* root = new treeNode;
  
      string insert;
      ifstream reading;
      count = 0;                // DECLARE VARIABLES!
      int size = 0;
  
      cout &lt;&lt; "Made variables.  ";
  
      reading.open(file); // Open and check file
  
      cout &lt;&lt; "File up.  ";
  
      //for  (int i = 0; i &lt; 15; i++) // See coder's note at top.
      while (!reading.eof())
      {
          cout &lt;&lt; "In loop.  ";
  
          char c = reading.get(); // Obtain character to check
  
          if (isalnum(c))
          {
              insert += c; // Word Storage update
          }
  
          else
          {
              if (count != 0)
              {
                  insertWord(insert, root); // Insert word
  
                  insert.clear();
                  size = 0;
                  count ++;
  
              }
          }
  
      }
  
      reading.close();
      return root; // Gives top node back.
  }
  </code></pre>
  
  <p>My question is: Are there any obvious errors that would cause this?  If not, is it compiler related?  And is there anything I can do about it?</p>