title: "cannot be used as a function error"
body: <p>I am writing a simple program that uses functions found in different .cpp files. All of my prototypes are contained in a header file. I pass some of the functions into other functions and am not sure if I am doing it correctly. The error I get is <em>"'functionname' cannot be used as a function"</em>. The function it says cannot be used is the <code>growthRate</code> function and the <code>estimatedPopulation</code> function. The data comes in through an input function (which I do think is working).</p>
  
  <p>Thanks!</p>
  
  <p><strong>header file:</strong></p>
  
  <pre><code>#ifndef header_h
  #define header_h
  
  #include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;cstdlib&gt;
  
  
  using namespace std;
  
  //prototypes
  void extern input(int&amp;, float&amp;, float&amp;, int&amp;);
  float extern growthRate (float, float);
  int extern estimatedPopulation (int, float);
  void extern output (int);
  void extern myLabel(const char *, const char *);
  
  #endif
  </code></pre>
  
  <p><strong>growthRate function:</strong></p>
  
  <pre><code> #include "header.h"
  
  float growthRate (float birthRate, float deathRate, float growthrt)     
  {    
      growthrt = ((birthRate) - (deathRate))
      return growthrt;   
  }
  </code></pre>
  
  <p><strong>estimatedPopulation function:</strong></p>
  
  <pre><code>    #include "header.h"
  
  int estimatedPopulation (int currentPopulation, float growthrt)
  {
      return ((currentPopulation) + (currentPopulation) * (growthrt / 100);
  }
  </code></pre>
  
  <p><strong>main:</strong></p>
  
  <pre><code>#include "header.h"
  
  int main ()
  {
      float birthRate, deathRate, growthRate;
      char response; 
      int currentPopulation, years, estimatedPopulation;
  
      do //main loop
      {  
          input (currentPopulation, birthRate, deathRate, years);
          growthRate (birthRate, deathRate, growthrt);
  
          estimatedPopulation (currentPopulation, growthrt);
          output (estimatedPopulation (currentPopulation, growthrt));
          cout &lt;&lt; "\n Would you like another population estimation? (y,n) ";
          cin &gt;&gt; response;
      }          
      while (response == 'Y' || response == 'y');
  
      myLabel ("5-19", "12/09/2010");   
  
      system ("Pause");
  
      return 0;
  }    
  </code></pre>