title: C++ Question,error C2064: term does not evaluate to a function taking 1 arguments
body: <p>Would you please help me with this simple code in C++, I don't know what is the problem here?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace::std;
  template &lt;class Type&gt;
  Type binsearch (Type item,Type *table,Type n)
  {
      int bot=0;
      int top=n-1;
      int mid, cmp;
      while (bot&lt;= top)
      {
          mid=(bot+top)/2;
          if(item==table(mid))
              return (mid);
          else if (item &lt;table[mid])
              top=mid-1;
          else
              bot=mid+1;
      }
      return -1;
  }
  
  int main ()
  {
  
      int nums[]={10, 12, 30, 38, 52, 100};
      cout&lt;&lt; binsearch(52, nums, 6);
  }
  </code></pre>