title: no operator "=" matches these operands operand types are std::basic_ostream<char, std::char_traits<char>> = int
body: <p>I'm getting the error no operator "=" matches these operands operand types are std::basic_ostream> = int when running code in C++ and i'm not sure whats actually causing the error.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;fstream&gt;
  #include &lt;cctype&gt;
  using namespace std;
  
  int main()
  {
      int num1, num2;
      double average;
  
      // Input 2 integers
      cout &lt;&lt; "Enter two integers separated by one or more spaces: ";
      cin &gt;&gt; num1, num2;
  
      //Find and display their average
      cout &lt;&lt; average = (num1 + num2) / 2;
  
      cout &lt;&lt; "\nThe average of these 2 numbers is " &lt;&lt; average &lt;&lt; "endl";
  
      return 0;
  }
  </code></pre>