Lost primary function

I am getting an error in the int main section of the code beloww (I've written the error as a comment//). I am afraid that I haven't been able to figure out where this primary expression should be. I've tried various different forms.

Thank you,




#include <iostream>
#include <cstdlib>

using namespace std;

class badger_susceptible{

int& AdMs,AdFs,JuvMs,JuvFs,CubMs,CubFs; //variables need updating each step

public:
badger_susceptible(); //constructor
double Birth (float& B); //function updated with each time step
double Death (float& D); // function updated with each time step
double Immig (float& Imigration);// function updated with each time step
double Emig (float& Emigration);// function updated with each time step
double SE (float StoE) const {return StoE;} // return badger s to e, constant values
double EI (float EtoI) const {return EtoI;} // return badger s to e, constant values
double JuvAdult (float& JuvtoAdult); // function updated with each time step
double CubJuv (float& CubtoJuv); // function updated with each time step
~badger_susceptible(); //destructor
};




int main ()
{

badger_susceptible AdMs;

AdMs.Birth(float& B=2); // expected primary expression before 'float'
AdMs.SE(float& StoE=0.01); // " "
AdMs.EI(float& EtoI=0.1); // " "
AdMs.Immig(float& Immigration=0.3); // " "
AdMs.Emig(float& Emigration=0.3); // " "

system("PAUSE");
return 0;
}
You need to read up on how functions are declared, defined and how they are invoked.
I've got separate file for the functions. Perhaps I should place them underneath.
Topic archived. No new replies allowed.