title: Not recognizing cout<< in my program?
body: <p>I'm creating a program with multiple files and it's not recognizing cout&lt;&lt; in my tnode file. Can anyone locate where the problem is? Among other errors, I get this error "cout was not declared in this scope" in my node file. 
  My main function:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "bst.h"
  using namespace std;
  
  
  
  int main(int argc, char *argv[]) {
      cout&lt;&lt;"hi";
      bst *list = new bst();
      return 0;
  }
  </code></pre>
  
  <p>My BinarySearchTree file:</p>
  
  <pre><code>#ifndef bst_H
  #define bst_H
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include "tnode.h"
  
  
  
  class bst
  {
      public:
  
      bst()
      {
      root = NULL;
      }
  void add(int key, char value) {
        if (root == NULL) {
              root = new tnode(key, value);
              return
        } else
              root-&gt;add(key, value);
              return
  }
  
  
  
  
  
  
  tnode *root;
  
  };
  
  #endif
  </code></pre>
  
  <p>My node file:</p>
  
  <pre><code>#ifndef tnode_H
  #define tnode_H
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  class tnode
  {
  public:
      tnode(int key, char value)
      {
                  this-&gt;key = key;
                  this-&gt;value = value;
                  N = 1;
                  left = NULL;
                  right = NULL;
                  cout&lt;&lt;"hi";
      }
  
  void add(int key, char value) {
        if (key == this-&gt;key)
        {
              cout&lt;&lt;"This key already exists";
              return;
        }
        else if (key &lt; this-&gt;key)
         {
              if (left == NULL) 
              {
                    left = new tnode(key, value);
                    cout&lt;&lt;"Your node has been placed!!";
                     return;
              } 
              else
              {
                    left-&gt;add(key, value);
                    cout&lt;&lt;"Your node has been placed!";
                    return;
              } 
        }
         else if (key &gt; this-&gt;key)
         {
              if (right == NULL) 
              {
                    right = new tnode(key, value);
                    cout&lt;&lt;"Your node has been placed!!"; return;
              } 
              else
                    return right-&gt;add(key, value);
         }
        return;
  }
          tnode* left;
          tnode* right;
          int key;
          char value;
          int N;
  
  };
  
  
  
  
  #endif
  </code></pre>