title: gcc and clang both cannot compile a loop program
body: <p>I've been unable to get gcc and clang to compile this simple program I've written for an exercise in a textbook. The objective of this program is to accept 2 simple integer values from standard input, and then print out the 2 values to standard output. The program I have written is as follows:</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;string&gt;
  #include&lt;vector&gt;
  #include&lt;algorithm&gt;
  #include&lt;cmath&gt;
  
  using namespace std;
  inline void keep_window_open() {char ch; cin&gt;&gt;ch;}
  
  int main() 
  {
  
    vector&lt;int&gt; vect;
    int number;
    int i = 0 ;
    while (cin &gt;&gt; number &amp;&amp; vect.size() &lt; 3) 
      {
      vect.push_back(number);
      }
  
    cout &lt;&lt; vect &lt;&lt; '\n';
  
  }  
  </code></pre>
  
  <p>When I compile the program with gcc, I get the following error:</p>
  
  <pre><code>Kohs-MacBook-Pro:Learning_C++ Kohaugustine$ gcc drill_chapter_4_v2.cpp -o drill_chapter_4_v2 -stdlib=libstdc++ -lstdc++
  drill_chapter_4_v2.cpp:21:8: error: invalid operands to binary expression ('ostream' (aka 'basic_ostream&lt;char&gt;') and 'vector&lt;int&gt;')
    cout &lt;&lt; vect &lt;&lt; '\n';
    ~~~~ ^  ~~~~
  </code></pre>
  
  <p>The same error "invalid operands to binary expression" also happens when I try using clang.</p>
  
  <p>Does anyone know what exactly is the problem here?</p>
  
  <p>I'm really new to C++ and although I previously had experience with Python, moving to C++ is so different, and I've yet to take any formal introductory courses in programming, so please bear with me if this is a very simple problem. I would greatly appreciate any help to move forward!</p>
  
  <p>Thank you! </p>