Invalid operands - how to fix this short code?
<p>I should analyse some snippets and find the bugs and fix them. I got all of them, just a problem with this one:</p>

<pre><code>class B {
public:
    int i;
    B(int i):i(i) {
    }
    B operator+(B&amp; other) {
        B result(i+other.i);
        return result;
    }
};

int main(int argc, char *argv[]) {

    B* b0 = new B(100);
    B* b1 = new B(300);
    B* b2 = b1+b2; //invalid operands of types ‘B*’ and ‘B*’ to binary ‘operator+’
}
</code></pre>

<p>Don't understand the problem and dont know how to fix that. Could somebody explain to me the problem?</p>
