How can I overload the plus sign to sum an undetermined number of objects
<pre><code>#include &lt;cmath&gt;
#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
using namespace std;

class myClass {
    int d;

public:

    myClass(){};

    int get_rand() const {
        return rand() % 10;
    }
};

int operator +(myClass d, myClass e) {
    return d.get_rand() + e.get_rand();
}

int main() {
    myClass mC;
    int sum = mC + mC;
    cout &lt;&lt; sum;

}
</code></pre>

<p>I want to be able to had as many Mc's as I want eg. <code>int sum = mC + mC + mC + mC;</code></p>
