error from using a function as parameter in another function
<p>I've been trying to debug this C++ error for many hours over 2 days and unable to figure it out or find answers in searching. Can anyone help illuminate me how to fix this?</p>

<p>Error:</p>

<pre><code>111:44: error: arithmetic on a pointer to the function type 'double (double, int)'
            return (principal * (pow((effective_rate + 1), years_elapsed)));
                                      ~~~~~~~~~~~~~~ ^
</code></pre>

<p>Relevant code:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;iomanip&gt;
#include &lt;string&gt;
#include &lt;cmath&gt;

using namespace std;

using std::ios; 
using std::cin;
using std::cout;
using std::endl;

double effective_rate(double annual_rate, int num_times_compounded=0);
double balance(double annual_rate, double principal, double &amp;years_elapsed, int num_times_compounded=0);

double annual_rate;
int num_times_compounded;
double principal;
double years_elapsed;

int main() {
 //code to get inputs and do printouts
}

double effective_rate(double annual_rate, int num_times_compounded) 
{
    if (num_times_compounded &gt; 0) {
        return (pow((1 + (annual_rate/num_times_compounded)), num_times_compounded) - 1);
    }   else {
        return (pow(e, annual_rate) - 1);
    }
}

double balance(double annual_rate, double principal, double years_elapsed, int num_times_compounded)
{
    if (num_times_compounded &gt; 0) {
[**this is line 111:**] return (principal * (pow((effective_rate + 1), years_elapsed)));
    } else {
        return (principal * (pow( (effective_rate + 1), num_times_compounded) ) );
    }
}
</code></pre>

<p>It appears that the second function does not see the first <code>effective_rate</code> function, and changing to pass by reference did not seem to work either. I must be missing something simple and obvious?</p>
