Operations with structures, code not working?
<p>Assume you are given three variables, revenue, expenses, and profit, all of type Money (a structured type with two int fields, dollars and cents). Assign to profit the result of subtracting expenses from revenue. Let's make the happy assumption that revenue exceeds expenses. However you still may find that the cents part of expenses exceeds that of revenue. If that is the case you will have to "borrow" 1 from revenue dollars (i.e. subtract 1) and "give" it to revenue's cents (i.e. add 100!) in order to carry out the subtraction properly.</p>

<p>Here is what I have but it's not working:</p>

<pre><code>if (revenue.cents &lt; expenses.cents)
   {
    revenue.dollars = revenue.dollars -1;
    revenue.cents = revenue.cents + 100;
    profit = revenue - expenses;
   }
else 
   {
    profit = revenue - expenses;
   }
</code></pre>

<p>I get this error message: 
error: no match for 'operator-' in 'revenue - expenses'</p>

<p>Any help is appreciated. Thanks. </p>
