title: std::function to member function
body: <pre><code>#include &lt;functional&gt;
  
  struct A
  {
      int func(int x, int y)
      {
          return x+y;
      }
  };
  
  int main()
  {
  
      typedef std::function&lt;int(int, int) &gt; Funcp;
      A a;
      //Funcp func = std:::bind(&amp;A::func, &amp;a);
      Funcp func = std::bind(&amp;A::func, a, std::placeholders::_1);
  
  
      return 0;
  }
  </code></pre>
  
  <p>I am getting errors in both of the above bind functions:</p>
  
  <pre><code> error C2825: '_Fty': must be a class or namespace when followed by '::'
  </code></pre>
  
  <p>Where is the syntax error? I am using visual studio 2010</p>