title: Keep getting "error: use of undeclared identifier 'cout' and error: reference to overloaded function could not be resolved
body: <p>I am writing a sorting program using a host of different functions as y'all can see from
      my declarations. However, I keep getting these same errors when I try to compile and run my program
      they are as follows:</p>
  
  <ol>
  <li><p><code>error: use of undeclared identifier 'cout'; did you mean 'count'?</code></p>
  
  <p><code>cout &lt;&lt; "Hello from main" &lt;&lt; endl;</code></p></li>
  <li><p><code>error: reference to overloaded function could not be resolved; did
  you mean to call it?</code></p>
  
  <p><code>cout &lt;&lt; "Hello from main" &lt;&lt; endl;</code></p></li>
  <li><code>error: use of undeclared identifier 'endl'; did you mean 'end'?</code>
  <code>cout &lt;&lt; "Hello from main" &lt;&lt; endl;</code></li>
  </ol>
  
  <p>I'm not really sure why I am getting these errors....I thought I included everything I needed to 
  in order to use "cout" and "endl" when I included using namespace std...
  I have a feeling it has something to do with all my function declarations, but that's just a hunch
  Any help that y'all can give would be greatly appreciated!!!!! </p>
  
  <pre><code>#include &lt;vector&gt;
  #include &lt;functional&gt;
  #include &lt;algorithm&gt;
  using namespace std;
  
  template &lt;typename Comparable&gt;
  void insertionSort(vector&lt;Comparable&gt; &amp; a);
  
  template &lt;typename Comparable&gt;
  void heapsort(vector&lt;Comparable&gt; &amp; a);
  
  template &lt;typename Comparable&gt;
  void percDown(vector&lt;Comparable&gt; &amp; a, int i, int n);
  
  template &lt;typename Comparable&gt;
  void mergeSort(vector&lt;Comparable&gt; &amp; a, vector&lt;Comparable&gt; &amp; tmpArray, int left, int right);
  
  template &lt;typename Comparable&gt;
  void mergeSort(vector&lt;Comparable&gt; &amp; a);
  
  template &lt;typename Comparable&gt;
  void merge(vector&lt;Comparable&gt; &amp; a, vector&lt;Comparable&gt; &amp; tmpArray, int leftPos, int rightPos, int rightEnd);
  
  template &lt;typename Comparable&gt;
  void quicksort(vector&lt;Comparable&gt; &amp; a);
  
  template &lt;typename Comparable&gt;
  const Comparable &amp; median3(vector&lt;Comparable&gt; &amp; a, int left, int right);
  
  template &lt;typename Comparable&gt;
  void quicksort(vector&lt;Comparable&gt; &amp; a, int left, int right);
  
  
  int main()
  {
      vector&lt;int&gt; myVector;
      cout &lt;&lt; "Hello from main" &lt;&lt; endl; ///This is where the error is//////
      return 0;
  }
  </code></pre>