Why isn't this compiling? no match for 'operator&='
<p>I'm getting a strange error when I try to compile this:</p>

<pre><code>class CucumberMarket {
public:
  bool ans;
  int n,cont,K,b;
  bool check(const vector&lt;int&gt; &amp;precios,long long price,int pos) {
    ++cont;
    if(cont == K and b &lt; price) ans = false;
    if(!ans) return ans;
    for(int i = pos + 1; i &lt; n; ++i) {
      if(cont &lt; K) ans &amp;= check(precios,price + precios[i],i);
    }
    --cont;
  }
  string check(vector &lt;int&gt; price, int budget, int k) {
    n = price.size();
    K = k;
    b = budget;
    ans = true;
    cont = 0;
    for(int i = 0; i &lt; n and ans; ++i) ans &amp;= (this -&gt; check(price,price[i],i));
    return ans ? "YES" : "NO";
  }
};
</code></pre>

<p>This is what I'm getting:</p>

<pre><code>C:\Users\Usuario\Desktop\Temp\C++\tc.cpp: In member function `std::string CucumberMarket::check(std::vector&lt;int, std::allocator&lt;int&gt; &gt;, int, int)':
C:\Users\Usuario\Desktop\Temp\C++\tc.cpp:24: error: no match for 'operator&amp;=' in '((CucumberMarket*)this)-&gt;CucumberMarket::ans &amp;= CucumberMarket::check(std::vector&lt;int, std::allocator&lt;int&gt; &gt;, int, int)(vector&lt;int,std::allocator&lt;int&gt; &gt;(((const std::vector&lt;int, std::allocator&lt;int&gt; &gt;&amp;)((const std::vector&lt;int, std::allocator&lt;int&gt; &gt;*)(&amp;price)))), (&amp;price)-&gt;std::vector&lt;_Tp, _Alloc&gt;::operator[] [with _Tp = int, _Alloc = std::allocator&lt;int&gt;](((unsigned int)i)), i)'
[Finished in 0.2s with exit code 1]
</code></pre>

<p>Line 24 is this:</p>

<pre><code>for(int i = 0; i &lt; n and ans; ++i) ans &amp;= (this -&gt; check(price,price[i],i));
</code></pre>

<p>I don't get it, why am I getting this? I have done this before and it's always compiled</p>
