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 fun
You can't pass a function as a parameter. Simply remove it from estimatedPopulation() and replace it with 'float growthRate'. use this in your calculation instead of calling the function:
int estimatedPopulation (int currentPopulation, float growthRate)
{
return (currentPopulation + currentPopulation * growthRate / 100);
}
and call it as:
int foo = estimatedPopulation (currentPopulation, growthRate (birthRate, deathRate));