Arithmetic operators: How to read this code?
<p>Look at this code:</p>

<pre><code>class Cents
{
private:
int m_nCents;

public:
Cents(int nCents) { m_nCents = nCents; }

// Add Cents + Cents
friend Cents operator+(const Cents &amp;c1, const Cents &amp;c2);

int GetCents() { return m_nCents; }
};

// note: this function is not a member function!
Cents operator+(const Cents &amp;c1, const Cents &amp;c2)
{
// use the Cents constructor and operator+(int, int)
return Cents(c1.m_nCents + c2.m_nCents);
}

int main()
{
Cents cCents1(6);
Cents cCents2(8);
Cents cCentsSum = cCents1 + cCents2;
std::cout &lt;&lt; "I have " &lt;&lt; cCentsSum .GetCents() &lt;&lt; " cents." &lt;&lt; std::endl;

return 0;
}
</code></pre>

<p>I don't understand why we use c1 and c2! And also how cCentsSum .GetCents() could call the summation of 6 and 8.</p>
