title: IntelliSense: no operator "<<" matches these operands
body: <p>I'm getting the error: </p>
  
  <pre><code> IntelliSense: no operator "&lt;&lt;" matches these operands
   operand types are: std::ostream &lt;&lt; std::string c:\Users\mohammad\Documents\Visual Studio 2013\Projects\summing a list of number\summing a list of number\summing a list of number.cpp  10
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code> // summing a list of number.cpp : Defines the entry point for the console application.
  //
  
  #include "stdafx.h"
  #include "iostream"
  using namespace std;
  int sum(int a[], int from, int size, const string&amp; context, int depth)
  {
      string indent(depth, '|');
      cout &lt;&lt; indent &lt;&lt; context &lt;&lt; "(a, " &lt;&lt; from &lt;&lt; ", " &lt;&lt; size &lt;&lt; ")" &lt;&lt; endl;
      int result = 0;
      if (size == 1)
      {
          result = a[from];
      }
      else if (size &gt; 1)
      {
          int midpoint = size / 2;
          int left = sum(a, from, midpoint, "left", depth + 1);
          int right = sum(a, from + midpoint, size - midpoint, "right", depth + 1);
          result = left + right;
          cout &lt;&lt; indent &lt;&lt; "=" &lt;&lt; left &lt;&lt; "+" &lt;&lt; right &lt;&lt; endl;
      }
      cout &lt;&lt; indent &lt;&lt; "=" &lt;&lt; result &lt;&lt; endl;
      return result;
  }
  
  int main(){
      int a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
      cout &lt;&lt; "sum = " &lt;&lt; sum(a, 0, 10, "sum", 0) &lt;&lt; endl;
      getchar();
  }
  </code></pre>
  
  <p>Why does it say there is an error due to std and ostream, when I already have included iostream and std?</p>
  
  <p>I'm using VS-2013.</p>